Client-specified display services in a distributed computing environment

ABSTRACT

Various embodiments of a mechanism for a client to specify a display service to be used by a service for displaying data for the client in a distributed computing environment are described. A display service on or associated with the device on which the client resides that the client wishes to use to display the results of the service. When the client runs the service, the client may send a message to the service specifying the service advertisement of the client&#39;s display service. The service may then generate a message channel that allows it to send messages to the client&#39;s display service. Thus, when displaying results, the service invoked by the client becomes a client of the client&#39;s display service and sends its results, directly or by reference, for display to that display service.

PRIORITY INFORMATION

This application claims benefit of priority to the following provisionalapplications, each of which is hereby incorporated by reference in itsentirety:

-   -   Ser. No. 60/202,975 filed May 9, 2000 titled Distributed        Computing Environment;    -   Ser. No. 60/208,011 filed May 26, 2000 titled Distributed        Computing Environment;    -   Ser. No. 60/209,430 filed Jun. 2, 2000 titled Distributed        Computing Environment;    -   Ser. No. 60/209,140 filed Jun. 2, 2000 titled Distributed        Computing Environment; and    -   Ser. No. 60/209,525 filed Jun. 5, 2000 titled Distributed        Computing Environment.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to distributed computing environments includingWeb-centric and Internet-centric distributed computing environments, andmore particularly to authorizing access of services by clients in aheterogeneous distributed computing environment based upon a messagepassing model.

2. Description of the Related Art

Intelligent devices are becoming increasingly common. Such devices rangefrom smart appliances, personal digital assistants (PDAs), cell phones,lap top computers, desktop computers, workstations, mainframes; even,super computers. Networks are also becoming an increasingly common wayto interconnect intelligent devices so that they may communicate withone another. However, there may be large differences in the computingpower and storage capabilities of various intelligent devices. Deviceswith more limited capabilities may be referred to as small footprintdevices or “thin” devices. Thin devices may not be able to participatein networks interconnecting more capable devices. However, it may stillbe desirable to interconnect a wide variety of different types ofintelligent devices.

The desire to improve networking capabilities is ever increasing.Business networks are expanding to include direct interaction withsuppliers and customers. Cellular phones, personal digital assistantsand Internet-enabled computers are commonplace in both business and thehome. Home networks are available for interconnecting audio/visualequipment such as televisions and stereo equipment to home computers,and other devices to control intelligent systems such as securitysystems and temperature control thermostats. High bandwidth mediums suchas cable and ASDL enable improved services such as Internet access videoon demand, e-commerce, etc. Network systems are becoming pervasive. Evenwithout a formal network, it is still desirable for intelligent devicesto be able to communicate with each other and share resources.

Currently, traditional networks are complex to set up, expand andmanage. For example, adding hardware or software to a network oftenrequires a network administrator to load drivers and configure systems.Making small changes to a network configuration may require that theentire network be brought down for a period. In addition, certainintelligent devices may not support the necessary interfaces tocommunicate on a given network.

What is needed is a simple way to connect various types of intelligentdevices to allow for communication and sharing of resources whileavoiding the interoperability and complex configuration problemsexisting in conventional networks. Various technologies exist forimproving the addition of devices to a network. For example, many modernI/O buses, such as the Universal Serial Bus, 1394 and PCI, support plugand play or dynamic discovery protocols to simplify the addition of anew device on the bus. However, these solutions are limited to specificperipheral buses and are not suitable for general networks.

A more recent technology, Jini from Sun Microsystems, Inc., seeks tosimplify the connection and sharing of devices such as printers and diskdrives on a network. A device that incorporates Jini may announce itselfto the network, may provide some details about its capabilities, and mayimmediately become accessible to other devices on the network. Jiniallows for distributed computing where the capabilities of the variousdevices are shared on a network. The Jini technology seeks to enableusers to share services and resources over a network. Another goal ofthe Jini technology is to provide users with easy access to resourcesanywhere on the network while allowing the network location of the userto change. Jini also seeks to simplify the task of building, maintainingand altering a network of devices, software and users.

Jini requires that each Jini enabled device have a certain amount ofmemory and processing power. Typically, a Jini enabled device isequipped with a Java Virtual Machine (JVM). Thus, Jini systems are Javatechnology centered. Java is a high level object oriented programminglanguage developed by Sun Microsystems, Inc. Java source code may becompiled into a format called bytecode, which may then be executed by aJava Virtual Machine. Since Java Virtual Machines may be provided formost computing platforms, Java and thus Jini provide for a certainamount of platform independence. The Jini architecture leverages off theassumption that the Java programming language is the implementationlanguage for the components of the Jini system. The ability todynamically download and run Java code is central to many features ofthe Jini architecture.

The purpose of the Jini architecture is to federate groups of devicesand software components into a single dynamic distributed system. A keyconcept within the Jini architecture is that of a service. A service isan entity that can be used by a person, a program, or another service.Two examples of services are printing a document and translating fromone word processor format to another. Jini allows the members of a Jinisystem to share access to services. Services in a Jini systemcommunicate with each other by using a service protocol, which is a setof interfaces written in the Java programming language. Services arefound and resolved in a Jini system by a look-up service. A look-upservice maps interfaces indicating the functionality provided by aservice to sets of objects that implement the service.

Descriptive entries may also be associated with a service. Devices andapplications use a process known as discovery to register with the Jininetwork. Once registered, the device or application places itself in thelook-up service. The look-up service may store not only pointers tothese services on the network, but also may store the code for accessingthese services. For example, when a printer registers with the look-upservice, it loads its printer driver and/or an interface to the driverinto the look-up service. When a client wants to use the printer, thedriver and driver interface are downloaded from the look-up service tothe client. This code mobility means that clients can take advantage ofservices from the network without pre-installing or loading drivers orother software.

Communication between services in a Jini system is accomplished usingthe Java Remote Method Invocation (RMI). RMI is a Java programminglanguage enabled extension to traditional remote procedure callmechanisms. RMI allows not only data to be passed from object to objectaround the Jini network, but full objects including code as well. Jinisystems depend upon this ability to move code around the network in aform that is encapsulated as a Java object.

Access to services in a Jini system is lease based. A lease is a grantof guaranteed access over a time. Each lease is negotiated between theuser of the service and the provider of the service as part of theservice protocol. A service may be requested for some period and accessmay be granted for some period presumably considering the requestperiod. Leases must be renewed for a service to remain part of the Jinisystem.

FIG. 1 illustrates the basic Jini technology stack. The Jini technologydefines a distributed programming model 12 (supported by JavaSpaces,leases, and object templates). Object communication in Jini is based onan RMI layer 14 over a TCP/IP capable networking layer 16.

Jini is a promising technology for simplifying distributed computing.However, for certain types of devices, Jini may not be appropriate. Thecomputing landscape is moving toward a distributed, Web-centric serviceand content model where the composition of client services and contentchanges rapidly. The client of the future may be a companion type devicethat users take with them wherever they go. Such a device may be acombination of a cell phone and a PDA for example. It would be desirablefor such devices to be able to communicate and share resources withdevices that are more powerful, as well as with thinner or less powerfuldevices.

In addition, with the advent of the Internet and resulting explosion ofdevices connected to the net, a distributed programming model designedto leverage this phenomenon is needed. An enabling technology is neededthat facilitates clients connecting to services in a reliable and securefashion. Various clients from thick to thin and services need to beconnected over the Internet, corporate internets, or even within singlecomputers. It is desirable to abstract the distance, latency andimplementation from both clients and services.

The key challenge for distributed computing technology is to be scalablefrom powerful thick clients down to very thin clients such as embeddedmobile devices. Current distributed computing technologies, such asJini, may not be scalable enough for the needs of all types of clients.Some devices, such as small footprint devices or embedded devices, maylack sufficient memory resources and/or lack sufficient networkingbandwidth to participate satisfactorily in current distributed computingtechnologies. The low end of the client spectrum, including embeddedmobile devices, often have limited or fixed code execution environments.These devices also may have minimal or no persistent storagecapabilities. Most small, embedded mobile devices do not support a JavaVirtual Machine. Most code-capable small clients run native code only.In addition, most small devices have little more than flash memory orbattery backed RAM as their sole persistent storage media. The size ofthe storage is often very small and sometimes read-only in nature.Furthermore, the access time of this type of storage media is often anorder of magnitude greater than hard disk access time in clients thatare more powerful.

Existing connection technologies, such as Jini, may not be as scalableas desired because they are too big. For example, Jini requires that allparticipants support Java; however, many small clients may not have theresources for a Java Virtual Machine. Furthermore, due to its use ofRMI, Jini requires that clients be able to download code and content.Jini may augment the existing client platform by downloading newclasses, which may pose security and size concerns for small devicessuch as embedded devices. Jini works by clients and resourcescommunicating by passing code and data. When a client activates a Jiniservice, the service may return its results to the client, which mayinclude a large amount of code or content. In Jini, a client may call amethod and a large object may be returned, and thus downloaded. Theclient may not have the resource to accept the returned object. Inaddition, RMI and Java itself require a lot of memory. Many small footprint devices may not have the resources to participate effectively orat all in current distributed computing technologies.

Another concern with existing distributed computing technologies is thatthey often require certain levels of connection capability andprotocols. For example, Jini assumes the existence of a network ofreasonable speed for connecting computers and devices. Jini alsorequires devices to support TCP/IP network transport protocol. However,many smaller devices may have limited connection capabilities. Smalldevices may have high latency or low speed network connections and maynot support TCP/IP.

As mentioned-above, Jini requires devices to support Java and thusinclude a Java Virtual Machine, which requires a certain amount ofprocessing and storage capabilities that might not be present for manysmall devices. This also restricts the flexibility of Jini in thatnon-Java devices may not directly participate in a Jini system. SinceJini requires Java, it may be deemed a homogenous environment. However,it is desirable to have a distributed computing facility forheterogeneous distributed computing that scales from extremely smallembedded devices through PDA's and cell phones to laptops and beyondeven to the most powerful computers.

Other heterogeneous solutions exist, such as the Common Object RequestBroker Architecture (CORBA). CORBA is an architecture that enablesprogram objects to communicate with one another regardless of theprogramming language they were written in or what operating systemthey're running on. However, CORBA does not address all of theconnection issues that are addressed by Jini. In addition, CORBA suffersfrom similar scalability problems as Jini.

Technology such as Jini and CORBA use a code-centric programming modelto define the interface between remote components. A code-centricprogramming model defines programmatic interfaces or API's forcommunication between remote clients or components. The API's may bedefined in a particular programming language. The API's must be agreedto by all software components to ensure proper interoperability. Sinceall access to components is through these standards API's, the code thatimplements these API's must be present in the client platform. The codemay be statically linked into the platform or dynamically downloadedwhen needed. Many embedded or mobile devices simply cannot accept codedynamically from a network due to the quality control issues involved aswell as the reliance on a single language and program executionenvironment. Data-centric models, such as networking protocols, mayavoid the dependence on moving code; however, such protocols are notrich enough to easily provide for distributed computing and they alsolack the ease of programming with code and other programming features,such as type safety.

Conventional distributed computing systems rely on the ability of aprogram executing on a first device to be able to remotely call aprogram on a second device and have the results returned to the firstdevice. The Remote Procedure Call (RPC) is a basic mechanism forremotely calling a program or procedure. CORBA and Jini are both basedon the ability to remotely invoke program methods. However,communicating by passing code or objects, such as in Jini or CORBA, maybe somewhat complex. For example, as mentioned above, Jini uses the JavaRemote Method Invocation (RMI) to communicate between services. In orderfor a client to move Java objects to and from remote locations, somemeans of serialization/deserialization is needed. Such currentfacilities in the Java Development Kit (JDK) rely upon the reflectionAPI to determine the content of a Java object, and ultimately that codemust consult the Virtual Machine. This code is quite large andinefficient.

The fundamental problems with the current method for doingserialization/deserialization include its size, speed, and objecttraversal model. Code outside the JVM does not know the structure orgraph of a Java object and thus must traverse the object graph, pullingit apart, and ultimately must call upon the JVM. Traditionalserialization and reflection mechanisms for storing and moving Javaobjects are just not practical for all types of devices, especiallythinner devices. Some of the difficulties with Java reflection andserialization are that an object's graph (an object's transitiveclosure) reflection is difficult to do outside the JVM. Serialization istoo large, requiring a large amount of code. In addition, serializationis a Java specific object interchange format and thus may not be usedwith non-Java devices.

The Jini distributed computing model requires the movement of Javaobjects between Java devices. Thus, the serialization mechanism itselfis not platform independent since it may not be used by non-Javaplatforms to send and receive objects. Serialization is a homogenousobject format—it only works on Java platforms. Serialization uses thereflection API and may be limited by security concerns, which often mustbe addressed using native JVM dependent methods. The reflection API mayprovide a graph of objects, but is inefficient due to the number ofcalls between the JVM and the code calling the reflection methods.

The use of Java reflection to serialize an object requires anapplication to ping pong in and out of the JVM to pick apart an objectone field at a time as the transitive closure of the object isdynamically analyzed. Deserializing an object using Java deserializationrequires the application to work closely with the JVM to reconstitutethe object one field at a time as the transitive closure of the objectis dynamically analyzed. Thus, Java serialization/deserialization isslow and cumbersome while also requiring large amounts of applicationand JVM code as well as persistent storage space.

Even for thin clients that do support Java, the Jini RMI may not bepractical for thin clients with minimal memory footprints and minimalbandwidth. The serialization associated with the Jini RMI is slow, big,requires the JVM reflection API, and is a Java specific objectrepresentation. Java deserialization is also slow, big and requires aserialized-object parser. Even Java based thin clients may not be ableto accept huge Java objects (along with needed classes) being returned(necessarily) across the network to the client as required in Jini. Amore scalable distributed computing mechanism is needed. It may bedesirable for a more scalable distributed computing mechanism to addresssecurity concerns and be expandable to allow for the passing of objects,such as Java objects, and even to allow for process migration from onenetwork mode to another.

Object based distributed computing systems need persistent storage.However, as discussed above, attempts at object storage are oftenlanguage and operating system specific. In addition, these objectstorage systems are too complicated to be used with many small, embeddedsystems. For example, the Jini technology uses JavaSpaces as persistentobject containers. However, a JavaSpace can only store Java objects andcannot be implemented in small devices. Each object in a JavaSpace isserialized and pays the above-described penalties associated with Javaserialization. It may be desirable to have a heterogeneous objectrepository for distributed computing that may scale from small to largedevices.

It is desirable in object oriented distributed systems to be able tolocate object repositories and find particular objects within thoserepositories. As mentioned above, the Jini look-up server may not bepractical for small devices with small memory footprints. A moreefficient mechanism for locating object stores may be desirable.

Distributed object access also desires a fair and efficient sharingmechanism. As described above Jini currently uses a leasing mechanism toshare objects. However, Jini leases are time based which may result in anumber of problems. For example, the current object holder might have noidea how long to lease an object and may hold it too long. In addition,the use of time-based leases may require that time be synchronizedbetween multiple machines. Moreover time based leasing may requireoperating system support. In addition, Jini leases are established andreleased via RMI. Thus, the Jini leasing mechanism suffers from theabove-noted problems with using RMI. Other leasing mechanisms may bedesirable.

Generally speaking, it is desirable for small memory foot print mobileclient devices to be able to run a variety of services, both legacy andnew, in a distributed environment. The types of small clients mayinclude cell phones and PDA's with a variety of different networkinginterfaces, typically low bandwidth. Often these devices have very smalldisplays with limited graphics, but they could include laptops andnotebook computers, which may have a larger display and moresophisticated graphics capabilities. The services may be a wide range ofapplications as well as control programs for devices such as printers.It is desirable for a mobile client to be able to use these serviceswherever they may be.

A mobile client will often be at a temporary dynamic network address, sonetworking messages it sends cannot be routed beyond that networkinginterface (otherwise there may be collisions when two different clientson different networks have the same dynamic address). Mobile clientsoften do not have the capability for a full function browser or othersophisticated software. The displays may limit the client from runningcertain applications. Traditional application models are based onpredetermined user interface or data characteristics. Any change to theapplication requires recompilation of the application.

It may be desirable for such clients to have a mechanism for finding andinvoking distributed applications or services. The client may need to beable to run even large legacy applications which could not possibly fitin the client's memory footprint. As discussed above, currenttechnology, such as Jini, may not be practical for small footprintdevices. The pervasiveness of mobile thin clients may also raiseadditional needs. For example, it may be desirable to locate servicesbased on the physical location of the user and his mobile client. Forexample, information about the services in a local vicinity may be veryhelpful, such as local restaurants, weather, traffic maps and movieinfo. Similarly, information about computing resources, such as printersin a particular location, may be helpful. Current technologies do notprovide an automatic mechanism for locating services based on physicallocation of the client. Another need raised by thin mobile clients isthat of addressing the human factor. Thin mobile clients typically donot contain ergonomic keyboards and monitors. The provision of suchhuman factor services and/or the ability to locate such services in adistributed computing environment may be desirable.

SUMMARY OF THE INVENTION

Various embodiments of a mechanism for a client to specify a displayservice to be used by a service for displaying data for the client in adistributed computing environment are described. There may be a displayservice on or associated with the device on which the client residesthat the client wishes to use to display the results of the service.When the client runs the service, the client may send a message to theservice specifying the service advertisement of the client's displayservice. The service may then build a gate that allows it to sendmessages to the client's display service. Thus, when displaying results,the service invoked by the client becomes a client of the client'sdisplay service and sends its results (directly or by reference) fordisplay to that display service.

A client may connect to a first service in a distributed computingenvironment. In connecting, the client may access a serviceadvertisement for the first service and use the service advertisement toconstruct a first messaging channel to the first service. The firstmessaging channel may include a client message endpoint (gate) on theclient side and a service message endpoint on the service side. Theclient may provide a display service advertisement to the first service.The display service advertisement may be an advertisement to a displayservice that the client wishes the first service to use in displayingresults data generated by the first service on behalf of the client. Inone embodiment, the display service and the client may be comprised onthe same device. In another embodiment, the display service may becomprised on a separate device.

The first service may use the display service advertisement to set up asecond messaging channel between the first service and the displayservice. The second messaging channel may include a message endpoint onthe first service side and a display service message endpoint on thedisplay service side. The message endpoints may exchange messages in adata representation language, e.g. XML. The first service may beconsidered a client of the display service in regards to the messagingchannel between the two services.

The first service may provide data to the display service. In oneembodiment, the data may be results data generated for the client by thefirst service. In one embodiment, the data may be sent to the displayservice by the first service in one or more messages on the messagingchannel. In one embodiment, the first service may store results data ona results space in the distributed computing environment, and then maysend an advertisement for the results data, or a reference to anadvertisement, to the display service. The display service may then usethe advertisement to access the results data from the results space(e.g. by setting up a third messaging channel to the results space forreceiving the results data in one or more messages).

The display service may direct the presentation of data provided by thefirst service on a presentation device for the client. Presentationdevices that may present results for the client may include, but are notlimited to: display devices such as CRTs on computers; LCDs on laptops,notebooks displays, etc; printers; speakers; and any other devicecapable of presenting results data of the service in visual, audio, orother perceptible format. In one embodiment, the presentation device maybe integrated in or coupled to a client device comprising the client. Inanother embodiment, the presentation device may be a standalone device.In one embodiment, the display service may format the data for displayin accordance with information included in the display service. Inanother embodiment, the first service may provide a schema includinginformation for formatting the data for display. In yet anotherembodiment, the client may provide a schema to the display service forformatting the data for presentation.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an illustration of a conventional distributed computingtechnology stack;

FIG. 2 is an illustration of a distributed computing environmentprogramming model according to one embodiment;

FIG. 3 is an illustration of messaging and networking layers for adistributed computing environment according to one embodiment;

FIG. 4 is an illustration of a discovery service for finding spacesadvertising objects or services in a distributed computing environmentaccording to one embodiment;

FIG. 5 illustrates client profiles supporting static and formattedmessages for a distributed computing environment according to oneembodiment;

FIG. 6 is an illustration of a distributed computing model employing XMLmessaging according to one embodiment;

FIG. 7 illustrates a platform independent distributing computingenvironment according to one embodiment;

FIG. 8 is an illustration of a distributed computing model in whichservices are advertised in spaces according to one embodiment;

FIG. 9 is an illustration of a distributed computing model in whichresults are stored in spaces according to one embodiment;

FIG. 10 a is an illustration of client and service gates as messagingendpoints in a distributed computing model according to one embodiment;

FIG. 10 b is an illustration a message endpoint generation according toa schema for accessing a service according to one embodiment.

FIG. 11 a illustrates gate creation in a distributed computingenvironment according to one embodiment;

FIG. 11 b illustrates gate creation and gate pairs in a distributedcomputing environment according to one embodiment;

FIG. 12 is an illustration of possible gate components in a distributedcomputing environment according to one embodiment;

FIG. 13 is an illustration of proxy client for a conventional browser toparticipate in the distributed computing environment according to oneembodiment;

FIG. 14 illustrates the use of a method gate to provide a remote methodinvocation interface to a service in a distributed computing environmentaccording to one embodiment;

FIG. 15 is an illustration of the use of a space in a distributedcomputing environment according to one embodiment;

FIG. 16 illustrates advertisement structure according to one embodiment;

FIG. 17 illustrates one example of advertisement state transitions thatan advertisement may undergo during its lifetime according to oneembodiment;

FIG. 18 is an illustration various space location mechanisms in adistributed computing environment according to one embodiment;

FIG. 19 is an illustration of space federations in a distributedcomputing environment according to one embodiment;

FIG. 20 is a flow diagram illustrating client formation of a sessionwith a space service in a distributed computing environment according toone embodiment;

FIG. 21 is an illustration of a space event type hierarchy for oneembodiment;

FIG. 22 is a flow diagram illustrating service instantiation in adistributed computing environment according to one embodiment;

FIG. 23 is an illustration of a default space in a distributed computingenvironment according to one embodiment;

FIG. 24 illustrates an example of a device bridging proximity-baseddevices onto another transport mechanism to allow the services providedby the proximity-based devices to be accessed by devices outside theproximity range of the devices, according to one embodiment;

FIG. 25 is an illustration of the use of lease renewal messages in adistributed computing environment according to one embodiment;

FIG. 26 a is a flow diagram illustrating an authentication serviceproviding an authentication credential to a client according to oneembodiment;

FIG. 26 b is a flow diagram expanding on step 1002 of FIG. 26 a andillustrating an authentication service generating an authenticationcredential according to one embodiment;

FIG. 27 illustrates one embodiment of a bridging mechanism;

FIG. 28 illustrates an example of a space discovery protocol mapped toan external discovery service according to one embodiment;

FIG. 29 illustrates bridging a client external to the distributedcomputing environment to a space in the distributed computingenvironment according to one embodiment;

FIG. 30 is an illustration of a proxy mechanism according to oneembodiment;

FIG. 31 illustrates one embodiment of a client with an associateddisplay and display service according to one embodiment;

FIGS. 32A and 32B illustrate examples of using schemas of dynamicdisplay objects according to one embodiment;

FIG. 33A illustrates a typical string representation in the Cprogramming language;

FIG. 33B illustrates an example of a conventional string function;

FIG. 33C illustrates an efficient method for representing and managingstrings in general, and in small footprint systems such as embeddedsystems in particular according to one embodiment;

FIG. 34 illustrates a process of moving objects between a client and aservice according to one embodiment;

FIGS. 35 a and 35 b are data flow diagrams illustrating embodimentswhere a virtual machine (e.g. JVM) includes extensions for compilingobjects (e.g. Java Objects) into XML representations of the objects, andfor decompiling XML representations of (Java) objects into (Java)objects;

FIG. 36 illustrates a client and a service accessing store mechanisms inthe distributed computing environment, according to one embodiment;

FIG. 37 illustrates process migration using an XML representation of thestate of a process, according to one embodiment;

FIG. 38 illustrates a mobile client device accessing spaces in a localdistributed computing network, according to one embodiment;

FIG. 39 a illustrates a user of a mobile device discovering the locationof docking stations, according to one embodiment;

FIG. 39 b illustrates a mobile client device connecting to a dockingstation, according to one embodiment;

FIG. 40 a illustrates an embodiment of embedded devices controlled by acontrol system and accessible within the distributed computingenvironment, according to one embodiment;

FIG. 40 b illustrates a device control system connected via a network(e.g. the Internet) to embedded devices accessible within thedistributed computing environment, according to one embodiment;

FIG. 41 is a flow diagram illustrating creating a gate according to oneembodiment;

FIG. 42 a is a flow diagram illustrating a client sending a message to aservice according to one embodiment;

FIG. 42 b is a flow diagram illustrating a service receiving a messagefrom a client and using an authentication service to authenticate themessage according to one embodiment;

FIG. 42 c is a flow diagram illustrating the general process of a clientand service exchanging messages with embedded authentication credentialaccording to one embodiment;

FIG. 43 is a flow diagram illustrating a mechanism for checking theintegrity of messages according to one embodiment;

FIG. 44 is a flow diagram illustrating a mechanism for leasing resourcesaccording to one embodiment;

FIGS. 45 a-45 e are flow diagrams illustrating various embodiments of amechanism for communicating between clients and services using methodgates;

FIG. 46 is a flow diagram illustrating a mechanism for sending objectsfrom services to clients using XML representations of the objects;

FIG. 47 is a flow diagram illustrating a mechanism for secure objectdecompilation on a client device;

FIG. 48 is a flow diagram illustrating a mechanism for migratingprocesses using data representation language representations of theprocesses in a distributed computing environment;

FIGS. 49 a-49 c are flow diagrams illustrating embodiments of amechanism for ensuring authorized use of a service in a distributedcomputing environment;

FIG. 50 is a flow diagram illustrating a client providing a displayservice for displaying data generated by a service on behalf of theclient according to one embodiment; and

FIG. 51 is a flow diagram illustrating a service providing apresentation schema for displaying results data according to oneembodiment.

While the invention is susceptible to various modifications andalternative forms, specific embodiments thereof are shown by way ofexample in the drawings and will herein be described in detail. Itshould be understood, however, that the drawings and detaileddescription thereto are not intended to limit the invention to theparticular form disclosed, but on the contrary, the intention is tocover all modifications, equivalents and alternatives falling within thespirit and scope of the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

Overview of Embodiments for Distributed Computing

Turning now to FIG. 2, a distributed computing environment programmingmodel is illustrated. The model includes API layer 102 for facilitatingdistributed computing. The API layer 102 provides an interface thatfacilitates clients connecting to services. The API layer 102 isconcerned with the discovery of and the connecting of clients andservices. The API layer 102 provides send message and receive messagecapabilities. This messaging API may provide an interface for simplemessages in a representation data or meta-data format, such as in theextensible Mark-up Language (XML). Note that while embodiments aredescribed herein employing XML, other meta-data type languages orformats may be used in alternate embodiments. In some embodiments, theAPI layer may also provide an interface for messages to communicatebetween objects or pass objects, such as Java objects. API's may beprovided to discover an object repository or “space”, find a particularobject, claim and release an object, and write or take an object to orfrom the object repository. Objects accessible through API layer 102 maybe represented by a representation data format, such as XML. Thus, anXML representation of an object may be manipulated, as opposed to theobject itself.

API layer 102 sits on top of a messaging layer 104. The messaging layer104 is based on a representation data format, such as XML. In oneembodiment, XML messages are generated by messaging layer 104 accordingto calls to the API layer 102. The messaging layer 104 may providedefined static messages that may be sent between clients and services.Messaging layer 104 may also provide for dynamically generated messages.In one embodiment, an object, such as a Java object, may be dynamicallyconverted into an XML representation. The messaging layer 104 may thensend the XML object representation as a message. Conversely, themessaging layer 104 may receive an XML representation of an object. Theobject may then be reconstituted from that message.

In one embodiment, messages sent by messaging layer 104 may includeseveral basic elements, such as an address, authentication credentials,security tokens, and a message body. The message system transmission andreceive mechanisms may be completely stateless. Any notion of state maybe embedded in the message stream between sender and receiver. Thus,message transmission may be done asynchronously. In a preferredembodiment, no connection model is imposed. Thus, transports such as TCPare not required. Also, error conditions may be limited to non-deliveryor security exceptions.

Messaging layer 104 sits on top of a message capable networking layer106. In a preferred embodiment, messaging layer 104 does not requirethat a particular networking protocol be used. TCP/IP and UDP/IP areexamples of message capable protocols that may be used for messagecapable networking layer 106. However, other more specialized protocolssuch as the Wireless Application Protocol (WAP) may also be used. Otherpossible message protocols are IrDA and Bluetooth network driversbeneath the transport layer. Networking layer 106 is not limited to asingle reliable connection protocol, such as TCP/IP. Therefore,connection to a larger variety of devices is possible.

In one embodiment, message capable network layer 106 may be implementedfrom the networking classes provided by the Java2 Micro Edition (J2βE)platform. The Java2 Micro Edition platform may be suitable for smallerfootprint devices that do not have the resources for a full Javaplatform or in which it would not be efficient to run a full Javaplatform. Since J2ME already provides a message capable family ofnetworking protocols (to support sockets), it follows that for the smallfootprint cost of adding messaging layer 104, distributing computingfacilities may be provided for small devices that already include J2ME.

Message capable networking layer 106 may also be provided by the JavaDevelopment Kit's (JDK) java.net networking classes. Alternatively, anymessage capable networking facilities may be used for message capablenetworking layer 106. In a preferred embodiment, a reliable transport isnot required, thus embedded devices supporting an unreliable data gramtransport such as UDP/IP may still support the messaging layer.

Thus, thin clients may participate in a distributed computingenvironment by simply adding a thin messaging layer 104 above a basicnetworking protocol stack. As shown in FIG. 3, a basic system includesmessaging layer 104 on top of a networking layer 106. The networkinglayer may provide for reliable messages, e.g. TCP, or unreliablemessages, e.g. UDP. The Internet Protocol (IP) is shown in FIG. 3 as anexample of protocol that may be used in networking layer 106. However,the distributed computing environment does not require IP. Otherprotocols may be used in the distributed computing environment besidesIP. A network driver such as for Ethernet, Token Ring, Bluetooth, etc.may also be part of the networking layer. Many small clients alreadyprovide a network driver and transport protocol such as UDP/IP. Thus,with the addition of the thin XML based messaging layer, the device mayparticipate in the distributed computing environment.

Thus, the foundation for the distributed computing environment is asimple message passing layer implemented on top of reliable connectionand/or unreliable data grams. The messaging technology is very differentfrom communications technologies employed in other distributioncomputing systems, such as Jini which employs the Java remote methodinvocation (RMI). The message passing layer 104 supports anasynchronous, stateless style of distributed programming, instead of thesynchronous, state-full style predicated by RMI. Moreover, messagepassing layer 104 is based on a data representation language such as XMLand thus copies data, but not code, from source to destination, unlikeRMI. By using a representation data language, such as XML, messaginglayer 104 may interoperate with non-Java and non-Jini platforms in aseamless fashion because Java code is not assumed on the sending orreceiving end of a message. Moreover, unlike RMI, messaging layer 104does not require a reliable transport mechanism such as TCP/IP.

The message passing layer may provide simple send( ) and receive( )methods to send a message specified as an array or string of bytes, forexample. The send( ) method may return immediately, performing the datatransfer asynchronously. For flow control purposes a callback method maybe supplied which is invoked in the event that the send( ) method throwsan exception indicating it cannot handle the send( ) request. Thereceive( ) method may be synchronous and may return the next availablemessage.

The message passing layer may also provide methods for storing XMLrepresentations of objects, services and content in “spaces”. A space isnamed and accessed on the network using an URI (Uniform ResourceIdentifier). The URI may be a URL (Uniform Resource Locator) or asimpler version of a URL. In some embodiments, the URL class may be toolarge. For such embodiments a simpler resource locator may be used thatspecifies the protocol for moving the messages between client andserver, protocol dependent host ID, protocol dependent port ID, and aspace name.

An XML representation of an object may be added to a space using awrite( ) method provided by the messaging layer. In one embodiment, theobject and the client-specified name may be supplied as parameters. Inone embodiment, the write method may translate the object into its XMLrepresentation. A take( ) method may be provided to return the objectand remove it from the space. A find( ) method may be provided to returna specified object from its XML representation in a space. The find( )method may also be used to return an array of matching objects in aspace given a class. Each of these space methods is implemented usingthe message-passing layer. A lease mechanism may also be provided, asdescribed in more detail below.

A discovery service may be provided for clients as a general searchfacility that may be used by a client to locate a particular space.Rather than attempt to define a complicated search protocol which maynot be feasible for a thin client to implement, the discovery servicemay offload the actual search to XML-based search facilities, leavingthe discovery service simply to provide interface functionality to theclient. The approach is illustrated in FIG. 4. In one embodiment, thediscovery service receives a string specifying something to locate, andit sends an XML message to a known discovery front-end (perhaps found ina default space), which then parses the string and makes a correspondingXML query to a search facility (which may be an internet searchfacility). The discovery front-end may parse what it obtains from thesearch facility and repackage it as an array of strings (each string maybe a URI for each found space) which it may send in an XML message tothe client. It should be noted that the discovery service does notrequire that the messaging be atop a connection-oriented transport.Thus, even very thin clients that do not have TCP could use such adiscovery service. The discovery front-end makes it possible for theclient to discover spaces without a browser or search facility on theclient. The client only needs a simple facility that sends a string thatspecifies keywords to the front-end, which interfaces with a searchfacility.

A client may be any platform that can send a message using at least asubset of the API and messaging layers. In one embodiment the API layermay provide for both static (or raw) and formatted (or cooked) messages.A server may be any platform capable of receiving and fulfilling messagerequests. An explicit raw message send may be provided that moves aseries of bytes from a client to a server or to another client. Themessage type may be specified as reliable (e.g. TCP) or unreliable (e.g.UDP). The smallest of devices may use raw unreliable message passing astheir sole means of participation in the distributed computingenvironment. The device may use these messages to announce its presenceand its status. Such small devices may also receive raw messages toimplement certain functions, such as turning a feature on or off.

Message-based services such as spaces may send and receive reliableformatted messages. A space message may be formatted with a well-definedheader and with XML. In one embodiment, a formatted message send mayoccur when a client uses a space method to claim, write, or take objectsfrom a space. The message contents may be dynamically formatted in XMLand contain well-defined headers. FIG. 5 illustrates client profilessupporting formatted and static messages. By using static messages,small devices may use a smaller profile of code to participate in thedistributed computing environment. For example, a small device couldjust send basic pre-defined messages. Depending on the client, thestatic pre-defined messages may consume a small amount of memory (e.g.<200 bytes). Static messages may also be an option even for largerdevices. On the other hand, the dynamic XML messages may be useful whenobject values are not known at compile time.

Turning now to FIG. 6, a distributed computing model is illustrated thatcombines a messaging system with XML messages and XML objectrepresentation. The platform independence of XML may be leveraged sothat the system may provide for a heterogeneous distributed computingenvironment. Thus, client 110 may be implemented on almost any platforminstead of a particular platform like Java. The messaging system may beimplemented on any network capable messaging layer, such as Internetprotocols (e.g. TCP/IP or UDP/IP). Thus, the computing environment maybe distributed over the Internet. In one embodiment, the messagingsystem may also use shared memory as a quick interprocess messagepassing mechanism when the client and/or space server and/or service areon the same computer system. The distributed computing model of FIG. 6may also be very scalable because almost any size client can beconfigured to send and/or receive XML messages.

As shown in FIG. 6, two kinds of software programs may run in thedistributed computing model: services 112 and clients 110. Services 112may advertise their capabilities to clients wishing to use the service.The services 112 may advertise their capabilities in spaces 114. Asillustrated in FIG. 7, clients 110 and services 112 may or may notreside within the same network device. For example, devices 120 and 124each support one client, whereas service 112 a and client 110 b areimplemented in the same device 122. Also, as illustrated in FIG. 7, noparticular platform is required for the devices to support the clientsand services. For example, device 120 is Java based, whereas device 124provides a native code runtime environment.

A device may be a networking transport addressable unit. Example devicesinclude, but by no means are limited to: PDAs, cellular/mobile phones,notebook computers, laptops, desktop computers, more powerful computersystems, even supercomputers. Both clients and services may beURI-addressable instances of software (or firmware) that run on devices.Using the distributed computing environment architecture, a client mayrun a service. A space is a service that manages a repository of XMLdocuments. Even though it is redundant, the term, space service, may beused herein for readability. A software component may be both a clientand service at different times. For example, when a service uses a space(e.g. to advertise itself), that service is a client of the space.

FIG. 8 illustrates the basic model of the distributed computingenvironment in one embodiment. The distributed computing environment mayconnect clients 110 to services 112 throughout a network. The networkmay be a wide area network such as the Internet. The network may also bea combination of networks such as a local area network (LAN) connectedto a wireless network over the Internet. As shown in FIG. 8, a service112 publishes an advertisement 132 for itself (represented in XML) in aspace 114. The advertisement 132 specifies the service's XML schema andURI address. Then, a client 110 may look up the advertisement 132. Theclient 110 may use the advertisement 132 to instantiate a gate 130. Thegate 130 allows the client 110 to run the service 112, by sending (andreceiving) XML messages to (and from) the service 112.

Some results of running a service may be returned to the client in anXML message. However, since other results may be too large for a smallclient to receive and consume at once, a service 112 may put thoseresults or an XML representation of the results 134 in a space 114, asshown in FIG. 9, and return them by reference (in an XML message) to theclient 110, rather than by value. Examples of methods of returning areference to results include, but are not limited to: returning in themessage a URI referencing the results in a space, and: returning in themessage an XML document including the URI of the results. Later, theclient 110 may access the results, or pass them by reference to anotherservice. The space in which results may be stored may be different fromthe space in which the service is advertised.

In one embodiment, the distributed computing environment uses XML forcontent definition, advertisement and description. New content for thedistributed computing environment (messages and advertisements forexample) are defined in XML. Existing content types (e.g. developed forother environments) may also be described using XML as a level ofindirection (meta-data). XML provides a powerful means of representingdata throughout a distributed system because, similar to the way thatJava provides universal code, XML provides universal data. XML islanguage agnostic and is self-describing. The XML content may bestrongly typed and validated using schemas. Using a provided XML schema,the system may ensure that only valid XML content is passed in amessage. XML content may also be translated, into other content typessuch as HTML and WML. Thus, clients that do not understand XML may stilluse the distributed computing environment services.

In one embodiment, the distributed computing environment messages maydefine the protocol used to connect clients with services, and toaddress content in spaces and stores. The use of messages to define aprotocol allows many different kinds of devices to participate in theprotocol. Each device may be free to implement the protocol in a mannerbest suited to its abilities and role. For example, not all devices arecapable of supporting a Java runtime environment. The distributedcomputing environment protocol definition does not require nor imply theuse of Java on a device. Nor does it preclude it.

A service's capabilities may be expressed in terms of the messages theservice accepts. A service's message set may be defined using an XMLschema. An XML message schema defines each message format using XMLtyped tags. The tag usage rules may also be defined in the schema. Themessage schema may be a component of an XML advertisement along with theservice's message endpoint used to receive messages. The distributedcomputing environment may allow clients to use all or some subset of aservice's capabilities. Security policies may be employed to enforce theset of capabilities given to a client. For example, once a set ofcapabilities has been given to a client, the client may not change thatset without proper authorization. This model of capability definitionallows for services levels that range from a base set of capabilities toan extended set. Extensions may be added to services by adding to thenumber of recognized messages.

In one embodiment, all operations in the distributed computingenvironment are embodied as XML messages sent between clients andservices. Storage (both transient and persistent) providers are examplesof services that enable clients and services to store, advertise, andaddress content. Clients and services may find each other and brokercontent using a transient storage space. Services may place a content orservice advertisement in a space. The advertisement may describe thecontent type or the capabilities of the service. Clients maysubsequently browse spaces looking for advertisements that match adesired set of capabilities. When a client finds a matchingadvertisement, a communication channel may be established which mayenable bi-directional message passing to the service backing theadvertisement. In one embodiment, the communication channel isauthenticated. Results (which are just another content type) fromservice operations may be returned directly to the client in a responsemessage, advertised and stored in a space, or advertised in a space, butstored persistently. Stored results may be addressed using a URI (e.g.returned in the response message) and may have an associatedauthentication credential.

Message Gates

As discussed above, the distributed computing environment leverages offthe use of a data description language, such as XML. XML may be used todescribe a target entity (e.g. document, service, or client) to anextent such that code may be generated to access that entity. Thegenerated code for accessing the target entity may be referred to as amessage gate. Thus, in one embodiment, the distributed computingenvironment differs from other distributed computing environments inthat instead of passing the necessary code between objects necessary toaccess the other object, the environment provides access to XMLdescriptions of an object or target so that code may be generated basedon the XML description to access the target. The distributed computingenvironment may use an XML schema to ensure type safety as well as aprogramming model (e.g. supported messages) without having to agree uponlanguage specific APIs, just XML schemas.

Code generated from an XML schema may also incorporate the language,security, type safety, and execution environment characteristics of thelocal platform. The local platform may thus have control over thegenerated code to ensure that it is bug-free and produces only validdata according to the schema. The generated code may conform to theclient's code execution environment (e.g. Java, C++, Smalltalk), as wellas its management and security framework (Web-server and/or operatingsystem).

Note that the distributed computing environment does not require thatcode generated from an XML schema be generated “on the fly” at runtime.Instead, some or all of the code may be pre-generated for categories (orclasses) of services, and then linked-in during the platform buildprocess. Pre-generation of code may be useful for some clients, such asembedded devices, where certain XML schemas are already known. In oneembodiment, some or all of the code doesn't actually have to begenerated at all. A private code-loading scheme (within the client)might be used in one embodiment to augment the generation process. Inaddition, the distributed computing environment may specify, in someembodiments, an interface to download code for additional features inaccessing a service (see, e.g., message conductors described below).Typically, such downloaded code may be small and the client may have theoption to download the code or not.

The phrase “generated code” may refer to code that originates within theclient under the control of the client code execution environment, or tocode that is generated elsewhere (such as on the service system or on aspace service system) and that may be downloaded to the client systemafter generation. Binding time, however, may be at runtime. At runtime,the generated code may be bound to a service address (URI), so that amessage may be sent to that service instance.

As discussed above, the interface to any service in the distributedcomputing environment may be specified by an XML schema, defining theset of messages that a client may send (and receive from) that service.As illustrated in FIG. 10, the client 110 and service 112 may eachconstruct a message gate 130 for communicating according to thespecified XML schema. From the XML schema advertised for the service 112(and possibly other information in the service advertisement), a messagegate 130 a or 130 b may be constructed by the client 110 a or 110 brespectively. A corresponding message gate 130 c generated from the sameXML schema may also exist on the service 112 a. A gate 130 is a messageendpoint that may send and/or receive type-safe XML messages, and thatmay verify the type correctness of XML messages when sending and/orreceiving the messages. The message gate may also provide forauthentication and/or other security mechanisms to ensure that themessage endpoint is secure. In one embodiment, message gates are alwayssecure.

The distributed computing environment messaging layer described abovemay be coupled to or may be part of the gate. The messaging layerasynchronously delivers an ordered sequence of bytes, using a networkingtransport, from the sender to the receiver, maintaining the notion onboth the sender and receiver that this sequence of bytes is one atomicunit, the message. The distributed computing environment does not assumethat the networking transport is IP-based. Instead, the messaging layermay sit atop whatever networking transport layer is supported by thedevice.

Message gates may provide a mechanism to send and receive XML messagesbetween clients and services. The XML messages may be “typed”. Forexample, the messages may include tags to indicate if a message datafield is, e.g., integer, floating point, text data, etc. A message gatemay be constructed to verify the type correctness of messages sent orreceived. A message gate also may authenticate (e.g. securely identify)the sender of a received message. An XML schema may be provided for aservice that describes the set of messages accepted by the serviceand/or sent by the service. A message gate may verify the correctness ofmessages sent or received according to the XML schema for which the gateis constructed.

A gate may be constructed as a single atomic unit of code and data thatperforms type verification and/or message correctness verificationand/or sender identification for messages between a client and a servicein the distributed computing environment. In one embodiment, once theatomic unit of code and data for a message gate has been created, itcannot be altered as to its typing, message descriptors, and senderidentification. In another embodiment, the gate may be modified as tothe contents of the message schema after the gate is created, includingdeleting, adding, or modifying messages in the message schema.

A message gate is the message endpoint for a client or service in thedistributed computing environment. A message gate may provide a securemessage endpoint that sends and receives type-safe XML messages.Messages gates may allow clients and services to exchange XML messagesin a secure and reliable fashion over any suitable message transport(e.g. HTTP). For a client, a message gate may represent the authority touse some or all of a service's capabilities. Each capability may beexpressed in terms of a message that may be sent to a service. Each suchmessage may be sent through a client message gate which may verify thecorrectness of the message. The message may be received by a servicemessage gate which may authenticate the message and verify itscorrectness.

A message gate may provide a secure communication endpoint that typechecks XML messages. As further discussed below, a message gate may alsoprovide a mechanism to restrict the message flow between clients andservices. In one embodiment when a client desires to access a service, aclient and service message gate pair is created, if not alreadyexisting. In one embodiment, the service message gate may be createdwhen the service receives a first message from the client message gate.In one embodiment, one or more service message gates may be created whenthe service is initialized, and may be used to pair with client messagegates when created. The creation of a message gate may involve anauthentication service that may negotiate the desired level of securityand the set of messages that may be passed between client and service.In one embodiment, the authentication service may accept a client IDtoken (also referred to as a client token), a service 11) token (alsoreferred to as a service token), and a data representation languagemessage schema that describes the set of data representation languagemessages that may be sent to or received from the service. For example,messages may be described that may be sent from a client to a service toinvoke the service or to invoke aspects of the service. Messages mayalso be described that are to be sent from the service, such as responsemessages and event notification messages. Refer to the Authenticationand Security section below for a further discussion of how theauthentication service may be used in the construction and use ofmessage gates.

A client message gate and a service message gate pair may allow messagesto be sent between the client and the service. In one embodiment,message gates may be created that only send and/or receive a subset ofthe total set of messages as described in the message schema for aservice. This limited access may be used within the distributedcomputing environment to implement a policy of least privilege wherebyclients are only given access to specific individual message types,based on a security policy. Refer to the Authentication and Securitysection below for a further discussion of security checks for gate usageand gate creation.

Client and service gates may perform the actual sending (and receiving)of the messages from the client to the service, using the protocolspecified in the service advertisement (URI of service in the serviceadvertisement). The client may run the service via this message passing.A message gate may provide a level of abstraction between a client and aservice. A client may access a service object through a message gateinstead of accessing the service object directly. Since the gateabstracts the service from the client, the service's code may not needto be loaded, and then started, until the client first uses the service.

The client gate may also perform verification of the message against theXML schema, or verification of the message against the XML schema may beperformed by the service gate, e.g. if the client indicates it has notyet been verified. In some embodiments, verification may not bepractical for simple clients and may thus not be required at the client.In some embodiments, verification may be performed by the service. Thegates may also perform authentication enablement and/or securityschemes. In one embodiment, if a client does not support the protocolspecified in the service advertisement, then it may not be able toconstruct the right gate. To avoid this problem, service advertisements(used for gate construction) may include a list of possible URIs for aservice, so a variety of clients may be supported.

A basic message gate may implement an API to send and receive messages.The API moves data (e.g. XML messages) in and out of the gate,validating messages before sending and/or upon receiving. In oneembodiment, message gates may support a fixed minimum API to send andreceive messages. This API may be extended to other features asdiscussed below. As illustrated in FIG. 10 b, a gate 130 may begenerated according to an XML schema 132. The generated gate codeverifies messages based upon the XML schema. The gate may verify correctmessage types and/or content through the message API. As illustrated inFIG. 10 b, through the message API a verified message may be sent to aservice. The message may be received by a corresponding gate at theservice. In response to the message, the service may generate results180. The service may return result data 182 through its gate. Theresults data may be the results themselves or a reference to theresults, such as a URI to results stored in a space. In variousembodiments, the message API may support synchronous messages(request-response), asynchronous messages (response is disconnected fromrequest), unicast messages (point to point), multi-cast messages(broadcast), and publish and subscribe (event messages), for example.Other type of messages may also be supported, such as remote methodinvocation messages.

Each message sent by a gate may include an authentication credential sothat the receiving gate may authenticate the message. Each message mayalso include a token which includes information allowing the receivinggate to verify that the message has not been compromised or altered. Forexample, the sender may compute a hash or checksum of the message whichmay be verified by the receiver. The sender may also encrypt this tokenand/or the entire message using the sender's private key and may includein the encrypted message the corresponding public key so that thereceiver may verify that the token was not changed. See the sectionbelow on Authentication and Security.

A pair of message gates may provide a mechanism for communicatingrequests from clients to services and response from services to clients.Two associated message gate endpoints may be used to create a secureatomic bi-directional message channel for request-response messagepassing. Thus, the distributed computing environment may employ amessage transport in which a message gate exists on both the client andthe service sides. The two gates may work together to provide a secureand reliable message channel.

Turning now to FIG. 1 a, an illustration is provided for one embodimentshowing construction of a gate 130 a in a client 110 from a serviceadvertisement or other service description 132. The client may have agate factory 140 that is trusted code on the client for generating gatesbased on XML service descriptions. The use of the gate factory 140 mayensure that the gate it generates is also trusted code, and that thecode is correct with respect to the service advertisement. As shown inFIG. 11 b, a gate 130 c may also be constructed at a service 112. Theclient gate 130 a and the service gate 130 c provide message endpointsfor communications between the client and service. In one embodiment,the pieces the gate factory needs to construct a gate 130 are the XMLschema of the service (from the service advertisement) and the URI ofthe service (from the service advertisement). In another embodiment, anauthentication credential may also be obtained and used in gateconstruction by running an authentication service specified in theservice advertisement.

A gate factory may provide a trusted mechanism to create message gates.In some embodiments, in order to ensure that a message gate is a trustedmessage endpoint, the code used to create the gate must be trusted code.A gate factory 140 may be a trusted package of code that is used tocreate gates. In one embodiment, each client and service device platformthat desires to send and receive messages in the distributed computingenvironment may have a gate factory. In some embodiments, gates may bepre-constructed by a separate gate factory so that a device withpre-constructed gates may not need a full gate factory, or may include apartial gate factory for binding a service URI and/or an authenticationcredential to the pre-constructed gate at runtime (e.g. when messagingis desired).

A gate factory for a device may generate gate code that may incorporatethe language, security, type safety, and/or execution environmentcharacteristics of the local device platform. By constructing gatesitself, a device has the ability to ensure that the generated gate codeis bug-free, produces only valid data, and provides type-safety. Anadvantage of a device generating its own gate code as opposed todownloading code for accessing a service is that the client codemanagement environment has the control. The generated code may conformto the client's code execution environment (e.g. Java, C++, Smalltalk),as well as its management and security framework (Web-server and/oroperating system). Generated code is also trusted code, because theclient's runtime environment was involved in its creation. Trustedsecurity information therefore may also be added by the trustedgenerated code. Thus, a device may receive an XML message schema for aservice and then construct a gate based on that schema to access thedevice. The XML schema may be viewed as defining the contract with theservice and the generated gate code as providing a secure way to executethe contract. Note that open devices, in which un-trusted (e.g.downloaded) code may be run, may be configured so that gates may begenerated only by trusted code. Open devices may employ a process modelin which gates are enclosed in a protected, isolated code container thatis not accessible to tools, such as debuggers, capable of discoveringthe gate's implementation, especially the gates authenticationcredential.

A gate factory 140 may negotiate on behalf of a client with a service tocreate a gate to send messages to the service. Similarly, a gate may beconstructed at the service to receive messages from the client gate andsend messages to the client gate. Together, the client and service gatesmay form a secure bi-directional communication channel.

A gate factory may provide a level of abstraction in gate creation. Forexample, when a client desires to use a service, instead of the clientdirectly creating a gate to access the service, the gate may be createdby a gate factory as part of instantiating the service.

The gate factory may create or may include its own trusted message gatethat is used to communicate with an authentication service (e.g.specified by a service advertisement) to receive an authenticationcredential for the gate being constructed. For services that do notrestrict access, a gate may be constructed without an authenticationcredential. The gates for such services may not need to send anauthentication credential with each message since the service does notrestrict access. The authentication service is an example of a servicethat does not restrict access, in one embodiment. Thus, a gate factorymay be configured to optimize gate construction by checking whether aservice restricts access. If the service does not restrict access, thenthe gate factory may avoid running an authentication service as part ofgate construction and may avoid included provisions for anauthentication credential as part of the constructed gate. The gatefactory may also receive or download an XML message schema (e.g.specified by a service advertisement) to create a gate matching thatschema. The gate factory may also receive or download a URI for theservice and/or for a service message gate for use in creating the clientmessage gate to communicate with the URI.

In addition, another gate construction optimization may be employed forcertain clients that do not desire to perform checking of messagesagainst a service's XML schema. The client may be too thin to performthe checking or may rely on the service gate to perform the checking ormay simply choose not to perform the checking (e.g. to reduce gatememory footprint). The gate factory may be configured to receive anindication of whether or not a gate should be constructed to verifymessages against the provided XML schema. In some embodiments, certainclients may have a gate factory that does not provide for messageverification against a schema for its constructed gates. In someembodiments, gates may be pre-constructed not to verify messages. Insome embodiments, a gate may be constructed to verify outgoing messagesonly, or verify received messages only. Thus, in some embodiments, aclient may avoid or may chose to avoid building some or all of the gatecode that checks the messages against the XML schema.

In some embodiments, devices may maintain a cache of gates to avoidconstructing them each time the same service is run. For example, when anew gate is constructed by a gate factory, the gate may be maintained ina gate cache. When the gate is no longer being used, it is kept in thegate cache instead of being deleted. If the gate cache becomes full, oneor more gates may be removed from the gate cache according to a cachereplacement algorithm, such as least recently used. When the gatefactory is called to construct a gate, it first checks the gate cache tosee if a matching gate already exists so that construction of a new gatemay be avoided.

The building of a gate may be made lightweight by appropriate reuse ofpieces used to construct other gates. Certain portions of each gate maybe the same, and thus may be reused from gate to gate, such as parts ofthe message verification code. Also, for some devices, common gate codemay be built into the system software for the device and shared by allgates on that device. Thus, the gate factory may avoid rebuilding thiscommon code for each gate. Instead, the gate factory may simply bind thegate to this system software portion. For example, a system softwareportion may be provided to handle the message layer over whatevertransports are provided on the device.

Space services in particular may be good candidates for many of the gateconstruction optimizations described above since a service gateconstructed for a space service may perform many of the same functionsas other service gates for that space service. Refer to the Spacessection below for more information on space services.

In some instances, a more efficient form of method invocation may exist.For example, if the target service runs in the same Java Virtual Machineas the client application, a more efficient form of method invocationmay be to create a Java dynamic proxy class for the service. In such acase, a java.lang.reflect.Method invocation may be faster than sending amessage. A gate binding time procedure may check for such anoptimization and use it instead of running the gate factory to create agate or bind an existing gate.

In one embodiment, such as for special-purpose clients or small embeddeddevices, the generation of gate code at runtime may not be desirable dueto memory consumption and code generation time. Thus, instead of havinga gate factory that generates gates at runtime, in some embodimentsgates may be pre-generated and built into the device. For example,message gates may be generated during the build of embedded software asa means of including a built-in secure message endpoint that does nothave to be constructed at runtime. Thus, a client with built-in gatesmay not need a full gate factory, or may require only a partial gatefactory for performing certain runtime binding to a built-in gate, suchas for the URI and/or authentication credential.

A generation tool may be provided for the pre-construction of gates. Thegeneration tool may include an XML parser, a code generator and a codecompiler. In one embodiment, the code generator may be a Java sourcecode generator and the code compiler may be a Java code compiler. Duringthe build of the software for which built-in message gates is desired,the generation tool is run with input from all the relevant XML schemasfor which gates are desired.

As an example, if it is desired for a device to have a built-in messagegate that can send and receive messages from a digital camera, the buildof the device software may include running the gate generation tool withthe camera's XML message schema as input. The XML schema may be parsedby the XML parser that may convert the XML schema into an internal formsuitable for quick access during a message verification process. Thetool's code generator may provide source code for a gate correspondingto the camera's schema. In some embodiments, the generation tool mayalso compile the source code and the gate code may be linked into thesoftware package for the device. At runtime, the camera service may bediscovered in the distributed computing environment. The message URI forthe camera service may be bound to the built-in gate for the camerawithin the device. The binding of the URI to the pre-constructed gatemay be performed by a gate constructor within the device. This gateconstructor may be a much smaller, simpler gate factory. When the cameraservice is instantiated, the URI for the camera service is passed to thegate constructor as an XML message. The gate constructor may then bindthe URI to the pre-constructed gate.

Thus, a gate may be partially or fully generated at runtime, or a gatemay be pre-generated before runtime with a binding process (e.g. for aURI or credential) performed at runtime. In one embodiment, a gategeneration tool such as the gate factory or the generation tool forpre-constructed gates may be a Java-based tool to provide some level ofplatform independence. Alternatively, gate generation tools may beprovided in any language, such as the native code for a particulardevice in the distributed computing environment.

Note that the distributed computing environment does not preclude adevice from downloading part or all of a gate's code. For example, insome embodiments, a service may provide gate code that may be downloadedby a client wishing to access that service. However, downloaded code maypresent size, security and/or safety risks.

A more detailed illustration of possible gate components for oneembodiment is shown in FIG. 12. A gate may include its address (or name)150, a destination gate address 152, a valid XML schema (or internalform thereof) 154, and a transport URI 153. In other embodiments, a gatemay also include an authentication credential 156. Some gates may alsoinclude a lease 158 and/or a message conductor 160 to verify messageordering.

A gate's name 150 may be a unique ID that will (for the life of thegate) refer only to it. A gate may be addressed using its gate name 150.In one embodiment, gate names may be generated as a combination of astring from an XML schema (e.g. from a service advertisement) and arandom number, such as a 128-bit random number. The name 150 may allowclients and services to migrate about the network and still worktogether. In a preferred embodiment, the gate address is independent ofthe physical message transport address and/or socket layer. Thus, a gatename may provide a virtual message endpoint address that may be boundand un-bound to a message transport address. In one embodiment, a gate'sname may be a Universal Unique Identifier (UUID) that may, for the lifeof the gate, refer only to it.

A gate name may persist as long as the gate persists so that differentapplications and clients executing within the same device may locate anduse a particular gate repeatedly. For example, a gate may be created fora first client process executing within a device to access a service.After the first client process has completed its activity with theservice, it may release the gate. Releasing the gate may involveun-binding the gate from the first client process's message transportaddress (e.g. IP and/or Port address). The gate may be stored in a gatecache or repository. A second client process executing within the samedevice that desires to run the same service may locate the gate by itsname and use it to access the service. To use the gate, the secondclient process may bind the gate to its message transport address, sothat the message endpoint for the second client process is a combinationof the gate name and the second client process's transport address. Inanother example, a client may receive a dynamic IP address (e.g. amobile client). When the client's transport address changes, a gate name(or gate names) may be re-bound to the client's new transport address sothat the client may still access a service(s) that it previouslyaccessed without having to relocate the service and recreate the gate. Agate name may also be useful for process migration. A process and anyassociated gates may be checkpointed or saved at one node in thedistributed computing environment and moved to another node. The processmay be restarted at the new node and the associated gates may be boundto the transport address for the new node so that the process will stillhave access to the external services to which it had access before beingmigrated. A gate may track the current location of another gate to whichit is paired. Thus a service or client may be migrated and still beaccessible. For example, replicated or load-balanced serviceimplementations may be abstracted from clients of the service by thegate.

Thus, a gate name 150 provides a flexible mechanism by which to addressa message endpoint in the distributed computing environment. A gate namemay be used to locate and/or address a gate over a wide range ofnetworks, from a local network to the Internet. Gate names may beindependent of message transport so that a message endpoint (gate) maybe moved from transport to transport by unbinding and rebinding todifferent underlying transport addresses (e.g. IP/Port address pairs).

In one embodiment, a gate may also be separated from a service so thatthe same gate may be used to send requests to different services overtime. This may involve un-binding the gate's destination gate address152 and binding a new destination gate address to the gate.

A gate may be implemented as a layer above a device's transport layer(e.g. networking sockets). Each gate may include a transport reference153. The gate name 150 may be bound to the transport reference 153 asdescribed above. Multiple gates may share the same message transport.For example, multiple gates may have transport references 153 to thesame TCP/IP socket. By sharing the same message transport, the size andcomplexity of each gate may be reduced. A device in the distributedcomputing environment may have a large number of gates that need to sendand receive messages. The message handling complexity for multiple gatesmay be reduced by sharing a common message transport. The transportreference 153 may be a transport URI (e.g. URL) or socket reference andmay provide a mechanism for naming an underlying transport and sharingthe transport with other gates. Multiple local gates may include areference 153 to the same transport, however, each local gate may behaveindependently of the other local gates sending and receiving messages toand from its paired remote gate.

The schema 154 may be downloaded from a space into the gate by the gatefactory. The schema may be compiled into an internal form suitable forquick access during a message verification process. In one embodiment,the schema may specify two groups of messages: client service messagesand provider service messages. The client service messages groupincludes the description of all messages that the client may send (thatthe provider supports), and the provider service messages group includesthe description of all messages that the provider may send (that theclient receives). In one embodiment, either the client or provider maysend a particular request to the space service to obtain a responsemessage with either: the entire client service messages, the entireprovider service messages, the entire client and provider servicemessages, or a specific message of either the client service messages orthe provider service messages. In addition, once a gate has beenconstructed, a client may query as to the capabilities of the servicewithout the gate actually sending a message, but instead by inspectingthe gate's set of messages.

As described above, a message gate may verify the sender of the messageusing an authentication credential, message content for type safety andaccording to an XML schema. However, it may also be desirable to verifythat messages are sent between a client and a service in the correctorder. It may be desirable to be able to provision applications(services) for clients to run without any preexisting specificfunctionality related to the application on the client (e.g. no GUI forthe application on the client). For example, a Web browser may be usedon a client as the GUI for a service instead of requiring anapplication-specific GUI. Of the possible messages in the XML schema,the client may need to know what message next to send to the service. Itmay be desirable for the client to be able to determine which message tosend next without requiring the client to have specific knowledge of theservice. In one embodiment, the service may continually send responsemessages indicating the next input it needs. The service would thenaccept only the corresponding messages from the client with therequested input specified. Other ad hoc scheme for message ordering mayalso be employed.

In another embodiment, a message conductor 160 may be employed in thegate or associated with the gate to verify the correct sequence ofmessages, as opposed to verifying each message's syntax (which mayalready be performed in the gate according to the schema). Messageconductor 160 may provide a more general approach for applicationprovisioning. The message conductor 160 may be specified in a service'sadvertisement. The message conductor indication in a schema may allowcode to be generated on or downloaded to the client during gateconstruction, which may provide the choreography needed to decide whichmessage to send next to the service. A message conductor may beimplemented as a Java application, a Java Script, WML script, or inother programming or scripting languages.

In one embodiment, the message conductor may accept as input an XMLdocument (e.g. from a service advertisement) that presents the validorder or choreography for messages that may be sent between a client andthe service. This XML document may also specify user interfaceinformation and other rules. The conductor may parse this XML documentinto an internal form and enforce message ordering (and/or other rules)according to the enclosed ordering information. The conductor mayprevent messages from being sent out of order. Or, if a message is sentout of order, an exception may be raised within the sending device. If amessage is received out of order, the conductor may send an automaticresponse message back declaring the ordering error. The sender may thenresend messages in the correct order. Note that in some embodiments,part or all of a conductor may be shared by several gates. Thus, aconductor may be linked to multiple gates.

In one embodiment of a distributed computing environment, front ends forservices (service interfaces) may be built in to clients. In oneembodiment, the service interface may be a preconstructed user interfaceprovided to the client by the service. In one embodiment, the serviceinterface may be provided to the client in the service advertisement.The service interface may interact on the client with the user of theservice to obtain input for running the service, and then may displayresults of running the service on the client. A “user” may be a human,embedded system, another client or service, etc. In one embodiment, aclient device may not be able to provision arbitrary services, as theclient device may only be able to run services for which it has a frontend built in. In one embodiment, a service interface for a service maybe implemented in a Web browser on the client.

In one embodiment, a message conductor and/or service interface may beexternal to the gate and thus abstracted from the gate and client. Theabstracted message conductor may provide provisioning of arbitraryservices to any client device. In one embodiment, the message conductormay be written in code that may run on substantially any platform. Inone embodiment, the message conductor may be written in the Javalanguage. In one embodiment, the message conductor may not require thearbitrary downloading of objects, for example, Java objects, returned tothe client device. For example, very large objects may be returned, andthe message conductor may choose to not download these very largeobjects. In one embodiment, the message conductor may send XML messagesto services from the client device on behalf of the client. The messageconductor may interact with the user of the service to receive input anddisplay results.

In one embodiment, a service interface may be provided that interactswith the client (e.g. thru a user interface) to obtain all informationto run the service, and then may display either results of running theservice or information regarding the location of results, asappropriate. The service interface may be either part of a messageconductor 160 or may be in addition to and work with message conductor160. The service interface may either be:

-   -   1. Built in to the client device and thus run on the client.    -   2. Downloaded to the client device from the space server.    -   3. Run on the space server.    -   4. Run on the service provider.

In one embodiment, to a client, the distributed computing environmentspace server must support #1 always, indicate if #2 is supported (byadvertisement in space), indicate if at least one of #3 and #4 issupported. Note that whether or not it supports #4 depends upon whetheror not the service provider supports #4. In one embodiment, to a serviceprovider, the distributed computing environment space server mustsupport #4 always and indicate if it supports #3.

Regardless of where the service interface runs, once a service isactivated, the service interface may interact with the client,displaying (remotely) requests for input on the client's display, andthen displaying (remotely) results of running the service. Suchinteraction with the client is implemented in terms of XML messages.

The service interface and/or message conductor may meet the needs of aclient user that may have discovered a service, but does not want toread a typically large, dry computer manual to figure out how to use theservice. As the service interface and/or message conductor interactswith the user to request all input that the service needs, they may evenprovide short descriptions of the input requested if the user requestsit. Once the service interface has obtained the necessary informationfrom the client, it may send XML messages to the service provider thatruns the service. The ordering of the messages may be verified by themessage conductor 160 in the gate.

In a preferred embodiment, all messages flow through a gate. A gate maybe configured to provide a flow control mechanism. For example, aservice may need to handle a large amount of incoming and outgoingmessages. Flow control may allow a service to keep up with high trafficvolume. Gates may be configured to monitor messages for flow controltags. When a gate receives a message, it may examine that message for aflow control tag. The flow control tags may be XML tags. A message mayinclude either an OFF tag or an ON tag, for example. If a receivedmessage includes an OFF tag, the receiving gate will stop sendingmessages to its paired destination gate. If the gate receives a messageincluding an ON tag, it may resume sending messages.

Thus, a service-side gate may monitor the use of its resources andtrigger flow control if use of its resources exceeds a threshold. Forexample, a service may reduce its load by sending messages including OFFtags to one or more client gates. The client gates receiving themessages with OFF tags will stop sending messages to the service.Pending messages in the clients may be buffered or may be handled byinternal flow control mechanisms. Once the service is able to handlemore requests, it may send messages to one or more clients with ON tagsso that the clients may resume sending messages. In other embodiments,other flow control tags may be supported in addition to or instead of ONand OFF. Other flow control tags may indicate to reduce message flow orthat message flow may be increased.

Message gates may be configured to perform resource monitoring. Forexample, since all messages may flow through a gate, the gate may beconfigured to manage and/or track a client's use of a service (andpossibly its associated resources such as memory or threads). A gate maybe configured to track the activity of a software program, such as aclient, by monitoring how much a resource, such as a service, is used orwhich and how many service resources are used. In one embodiment, a gatemay generate or may facilitate generation of a client activity log. Eachmessage and its destination or sender may be logged.

A gate may also be configured to perform resource monitoring for flowcontrol from the local (sending) side of a gate pair. If the clientexceeds an allocated bandwidth of service (or resource) usage, the gatemay automatically throttle back the flow of messages, for example. Thus,a client-side message gate may automatically trigger different flowcontrol modes by monitoring the flow of outgoing messages. If theoutgoing message flow exceeds a threshold, the gate may reduce or shutoff its flow of outgoing messages. The threshold may be specified in aservice's XML schema or advertisement. In some embodiments, thethreshold may be specified only for messages using certain serviceresources or for all messages.

The gate may also be configured to determine when message flow may beincreased or resumed. In one embodiment, the gate may maintain a countof outgoing messages that have been sent without the matching reply(response) received. When matching responses are received by theclient-side gate, the count of outstanding request messages may bedecremented. When the counts decrements below a specified outstandingrequest message threshold, the gate may increase or resume sending newrequest messages.

A gate may be configured to support message-based accounting and/orbilling. A billing system may be implemented based upon the numberand/or kind of messages sent and/or received by a message gate. Sinceall messages to and from a client may pass through a gate, the gate maybe configured to facilitate charging a client for service usage, forexample on a per message basis or “pay as you go”. Thus, a billingsystem may be implemented within the distributed computing environmentin which a user could be charged, for example, each time a message issent and/or received by software running on behalf of the user.

In one embodiment, a message gate may receive billing information froman XML schema, e.g. for a service. The billing information may denote abilling policy and a charge-back URI. The charge-back URI may be used bythe message gate to charge time or usage on behalf of a user. A messagegate may make a charge-back by sending a charge message to thecharge-back URI specified in the XML schema. Gates so configured may bereferred to as bill gates. The billing policy may indicate chargeamounts per message or per cumulative message totals, etc. The billingpolicy may indicate how much and/or how often (e.g. after every x numberof messages sent and/or received) to charge the user. The policy mayindicate that only certain types of messages trigger charges, such amessages requesting a specified service resource. The billing policy mayalso indicate different billing models for different clients or classesof clients. For example, a billing policy may be configured (e.g. in aservice's XML schema) so that some clients may pay a one-time chargewhen they create a gate to access the service. The policy may indicateclients that are to pay as they go (e.g. per message), or may indicateclients that are not to be charged at all.

In some embodiments, a client may be too thin to support a full gate, ora client may not include software to directly participate in thedistributed computing environment. In such embodiments, a server (suchas the space server in which the service is advertised or anotherserver) may be a full or partial proxy gate for the client. The servermay instantiate a service agent (which may include a gate) for eachservice to be used by the client. The service agent may verifypermission to send messages; send messages to the provider, possiblyqueuing them until the provider can accept the next one; send messagesto the client, possibly queuing them until the client can accept thenext one; and manage the storing of results in a result or activationspace. See also the Bridging section herein.

For example, as illustrated in FIG. 13, a client may be a conventionalbrowser 400 that does not support gates to participate directly in themessaging scheme described above. The browser 400 may be aided by aproxy servlet (agent) 402. The browser user may use a search engine tofind a Web page that fronts (displays the contents of) a spaceadvertising services within the distributed computing environment. Theuser is able to point and click on the space Web page and, with the helpof the servlet, to access services. The Web pages may include scripts,for example, Java or WML scripts, which may be used in connecting thebrowser to the proxy servlet. Scripts may also be used to send messagesto the proxy servlet. The servlet agent may translate Web page actionsinto messages on behalf of the browser client. These actions may includenavigating a space, starting services, and returning results. Resultpage URIs (referencing pages containing XML) may be returned directly(or translated into HTML or WAP if needed) to the browser, for displayto the user. Thus, the browser-based client does not need to know how tostart services, nor which messages to send during the service usagesession. For example, a user of a WAP browser (e.g. on a cell phone) mayconnect to a space page, browse its contents (services), and then starta service, all by pointing and clicking. The agent 402 provides theclient interface between the conventional client and the distributedcomputing environment.

The distributed computing environment may include several differenttypes of message gates for communicating between clients and servicesthat support different features. For example, as discussed above, somegates may support flow control or billing. Another type of message gatemay support a form of remote method invocation. This type of gate may bereferred to as a method gate.

A gate is a secure message endpoint that sends and receives type-safemessages, e.g. XML messages. The remote method invocation (RMI) stylegate may be referred to as a method gate. The direct data-centric gatemay be referred to as a message gate. A method gate may be implementedas a “layer” on top of a message gate. The exact implementation may bedefined in the platform binding.

FIG. 14 illustrates the use of a method gate to provide a remote methodinvocation interface to a service. Method gates provide a methodinterface between clients and services. A method gate may bebi-directional, allowing remote method invocations from client toservice and from service to client. A method gate 172 may be generatedfrom XML schema information 170 (e.g. from a service advertisement in aspace). The XML schema information 170 includes XML defining a methodinterface(s). From this information, code may be generated as part ofthe gate for interfacing to one or more methods. Each method invocation(e.g. from a client application 176) in the generated code may cause amessage to be sent to the service containing the marshaled methodparameters. The message syntax and parameters to be included may bespecified in the XML schema. Thus, the method gate 172 provides an XMLmessage interface to remotely invoke a service method. The method gatemay be generated on the client or proxied on a server, such as the spaceserver where the service method was advertised or a special gatewayserver.

A service may have a corresponding method gate that implements or islinked to a set of object methods that correspond to the set of methodmessages defined in the service's XML schema. There may be a one to onecorrespondence between the object methods implemented by or linked tothe service's method gate and the method messages defined by theservice's XML schema. Once a service's corresponding method receives amessage from a client to invoke one of the service's methods, theservice's method gate may unmarshal or unpack the parameters of themessage invocation and then invoke the method indicated by the receivedmessage and pass the unmarshalled parameters.

The method gate may provide a synchronous request-response messageinterface in which clients remotely call methods causing services toreturn results. The underlying message passing mechanics may becompletely hidden from the client. This form of remote method invocationmay deal with method results as follows. Instead of downloading resultobjects (and associated classes) into the client, only a resultreference or references are returned in XML messages, in one embodiment.An object reference 178 may be a generated code proxy (e.g. resultsgate) representing the real object result 180 (still stored out on thenet, for example). In other embodiments, the client may choose toreceive the actual result object. In addition, once a client hasreceived a result object reference, the client may use this reference toreceive or manipulate the actual result object. In one embodiment, theresult reference includes one or more URIs to the real result.

The real result object(s) may be stored in a service results space(which may be created dynamically by a servlet, for example). Thistemporary results space may act as a query results cache. The resultscache (space) may be patrolled by server software (garbage collector)that cleans up old result areas. Results returned from each methodinvocation may be advertised in the results space. A result itself maybe or may include a method that could then be remotely instantiated by aclient, thus generating its own method gate. Therefore, the distributedcomputing environment may support recursive remote method invocation.

As mentioned above, when a client uses a method gate to remotely invokea service method, a reference to the method results may be returned fromthe service method gate instead of the actual results. From thisreference, a results gate may be generated to access the actual result.Thus, the client or client method gate may receive a result URI andperhaps a result XML schema and/or authentication credential forconstructing a gate to access the remote method results.

In one embodiment, a service gate may create a “child gate” for theresults. This child results gate may share the same authenticationcredential as its parent gate. In some embodiments, results may have adifferent set of access rights and thus may not share the sameauthentication credential as its parent. For example, a payroll servicemay allow a different set of users to initiate than to read the payrollservice's results (paychecks).

A service method gate may return a child results gate to the client gateas the result of the method. The client may then use the results gate toaccess the actual results. In one embodiment, the software program(client) receiving the results gate cannot distinguish between theresults gate and the result itself in which case the results gate may bean object proxy for the actual result object. The results gate may alsobe a method gate that supports remote method invocation to resultobjects. In this manner, a chain of parent and child method/resultsgates may be created.

In one embodiment, the method gates and remote methods may be in Java.In this embodiment, method results are correctly typed according to theJava typing system. When a Java method is remotely invoked as describedabove, the results gate may be cast into the Java type that matches theresult type. In this embodiment, method gates may be used in thedistributed computing environment to allow remote Java objects to behaveas local Java objects. The method invocation and results may appear thesame to the client Java software program whether the real object islocal or remote.

See the Spaces section below for a further discussion on the use ofspaces for results.

Method gates provide a method interface to clients, instead of just araw message interface. In one embodiment, a method gate may beimplemented on top of a message gate. The message gate provides themethod gate with transport access, message content validation, andmessage content access (get content and set content methods). In oneembodiment, each method invocation in the generated code (i.e. methodgate) causes a single synchronous message to be sent to the servicecontaining the marshaled method parameters. The method gate may thencauses the current thread to block, waiting for a response message fromthe service.

This style of programming may be referred to as synchronousrequest-response programming. Clients call methods causing services toreturn results. The underlying message passing mechanics are completelyhidden from the client. This form of RMI deals with method results in aunique and interesting way. In one embodiment, instead of downloadingobjects (and associated classes) into the client, only result objectreferences (Advertisements or Advertisement URIs) are returned. In thisembodiment, given an object reference, a results gate may be generatedthat gives access to the real object (still stored out on the net).

In one embodiment, some results produced by a service are advertised ina space and ultimately accessed using a results gate. The results gatemay or may not contain the same security credential as the input gateused to generate the results. Because input to a service is asynchronousfrom its output (the results), the results may have a different set ofaccess rights associated with it. Using a B2B scenario, a payrollservice may allow a different set of users to initiate payroll than toread the payroll service's results (paychecks).

In one embodiment, results gate generation for message gate results maybe manually initiated. In-line results (e.g. XML documents sent as aresponse from a service) can be accessed using the message contentaccess (e.g. get and set) methods available on message gates. Methodresults gate generation may be automatically initiated. The method gatemodel of programming hides results gate generation, creating a seamless,remote method invocation programming model without the overhead of classloading or requiring the application programmer to manually generateresults gates.

FIGS. 45 a-45 e are flow diagrams illustrating various embodiments ofmechanisms for communicating between clients and services in adistributed computing environment using method gates. In FIG. 45 a, at2100, a message including a representation of a computer programminglanguage (e.g. Java) method call may be generated on the client device.In one embodiment, the message may be in a data representation language.In one embodiment, the data representation language is XML. In oneembodiment, a client process may make a method call, and the method callmay be marshaled into a representation of the method call included themessage. The representation of the method call in the message mayinclude, but is not limited to, an identifier (e.g. method name) thatidentifies the method call, and zero or more parameter values for themethod call. The representation of the method may be in the datarepresentation language. For example, the elements in the representationmay be one or more tags (e.g. XML tags) in the message.

In one embodiment, a method gate may access the method call generated bythe client process, and then may marshal the method call into themessage. In one embodiment, a message including a representation of amethod call may be generated on the client when no actual method callwas made. In this embodiment, a process on the client may invokecomputer programming language methods on a service without actuallygenerating computer programming language method calls. For example, aclient may include one or more “canned” messages that the client maysend to the service to invoke one or more methods of the service. Thus,the client may use messages to request the service to perform methodswithout a process on the client actually making a method call.

At 2102, the client may send the message to the service. In oneembodiment, the client method gate may send the message to the service.In one embodiment, the client method gate may send the message directlyto the service. In another embodiment, the client method gate mayprovide the message to a client message gate, which may then send themessage to the service.

At 2104, after the service receives the message, a function may beperformed on the service in accordance with the representation of themethod call in the received message. In one embodiment, the service mayunmarshal or unpack the method call from the received message, invokethe method indicated by the received message and pass the unmarshaledparameter values to the invoked method. In one embodiment, theunmarshaling and invoking may be performed by a method gate on theservice. In one embodiment, instead of invoking the method, the servicemay perform a function (e.g. other method or some other action) inresponse to the message. For example, the service may execute a functionthat generates the desired results of the method call without invoking amethod on the service. In another example, the service may havepreviously generated results data for the method call, and may providethe results data to the client in response to the message withoutinvoking the method.

At 2106, the function on the service may generate results data inresponse to the message. At 2108, the results data may be provided tothe client. In one embodiment, the results data may be returned directlyto the client (e.g. in a message). In another embodiment, the resultsdata may be stored in the distributed computing environment (e.g. on theservice device, or on a space service external to the service device)and an advertisement may be provided to the client for accessing thestored results data. The client may then use the advertisement to set upa results gate for accessing the results data. In another embodiment,the service may return a results gate to the client for accessing theresults data.

In one embodiment, the client may transform a method call into one ormore messages that may be sent to the service, wherein the messaged donot include information that may be unmarshaled into a method call, butinstead include information that may be used by the service to perform afunction on behalf of the client. In this embodiment, the service maynot know that the messages were originally generated from a method call.In one embodiment, a client method gate may transform a method callgenerated on the client into one or more messages requesting the serviceto perform one or more functions for the client, but not including amarshaled method call that the service may unmarshal into a method call.These messages may still be considered a “representation” of the methodcall, but may not be in a form that the service recognizes as amarshaled method call that may be unmarshaled to regenerate the methodcall.

In one embodiment, the service may transform one or more messagesrequesting the service to perform one or more functions into a methodcall. In this embodiment, no method call may have been made on theclient to generate the messages (the client may not have generated theone or more message in response to a method call). Thus, the client maynot know that the service is invoking a method to perform the requestedfunction(s). In one embodiment, a service method gate may receive themessage(s) from the client and construct a method call from theinformation in the message(s).

In FIG. 45 b, a client process executing within a client device may makea method call (i.e. invoke the method) at 2110. In one embodiment, themethod call may be a call to a Java method. In one embodiment, thecalled method may not be implemented locally on the client device, butis implemented on a service device external to the client device. At2112, a client method gate on the client device may receive the methodcall. The client method gate may then marshal the method call into adata representation language message. In one embodiment, the datarepresentation language is XML. The message may include an identifier ofthe method and one or more parameter values of the method. Theidentifier may be a name, number, or other value used to identify themethod to the receiver of the message. A method call may include one ormore parameters, and when called, the caller supplies values for theseparameters. In one embodiment, more than one method call may share thesame identifier, and may be distinguished by the parameters of themethod.

At 2114, the client method gate may send the message to the servicedevice. In one embodiment, the client method gate may send the messagedirectly to the service method gate. In another embodiment, illustratedin FIG. 45 c, the client method gate may provide the message to a clientmessage gate at 2124. The client message gate may then send the messageto a service message gate at 2126. The service message gate may thenprovide the message to the service method gate at 2128. The embodimentillustrated in FIG. 45 c frees the method gates from the responsibilityof handling the sending and receiving of messages, and simplifies theprogramming model of the distributed computing environment bycompartmentalizing the RMI functionality and the message handlingfunctionality.

In one embodiment, the client may attach a credential to the message forverifying the message (and client) on the service. In one embodiment,the credential may have been obtained by the client from anauthentication service in the distributed computing environment. In oneembodiment, the service may have provided information to the clientidentifying the authentication service to use (e.g. in a serviceadvertisement). In one embodiment, the service may use the sameauthentication service to authenticate the client (e.g. when a firstmessage is received from the client). The service may then check eachmessage from the client to verify that the message includes the propercredential for the client. In one embodiment, the service method gatemay perform the verification. In another embodiment, a service messagegate may perform the verification, and may then pass the verifiedmessage to the service method gate. See the Authentication and Securitysection for more information on credentials and verification.

Returning to FIG. 45 b, at 2116, the service method gate may unmarshalor unpack the method call from the received message, invoke the methodindicated by the received message and pass the unmarshaled parametervalues to the invoked method. The service method gate may use theidentifier included in the message to locate the template for the methodcall. The service method gate may implement or may be linked to a set ofmethods that correspond to the set of method messages defined in theservice's XML schema. There may be a one to one correspondence betweenthe object methods implemented by or linked to the service's method gateand the method messages defined by the service's XML schema. In oneembodiment, a method gate may be created on a client in accordance witha message schema provided to the client by the service, e.g. in aservice advertisement. In one embodiment, a gate factory may be used togenerate the method gate on the client.

At 2118, the invoked method may be implemented or performed on theservice. At 2120, the invoked method may produce results output from theinvocation in accordance with the parameter values received in themethod invocation. At 2122, the results of the method invocation may beprovided to the client process that originally invoked the method. Inone embodiment, the service may directly provide the results to theclient in one or more results messages. In another embodiment, theservice may place the results in a space and may provide a resultsadvertisement to the client for accessing the results. FIGS. 45 d and 45e illustrate other embodiments where a results gate may be provided tothe client for accessing the results.

In FIG. 45 d, at 2130, the service method gate may provide a resultsreference to the service message gate. In one embodiment, the resultsreference may be an advertisement to the results. In another embodiment,the results reference may be an address, e.g. a URI, for the results. At2132, the service message gate may send the results reference to theclient message gate in a message. At 2134, the client, after receivingthe message, may create a results gate from the results referencemessage. For example, a results advertisement may be provided in themessage, and the client may create the results gate in accordance withthe results advertisement in a similar manner to creating message gatesfrom advertisements as described elsewhere herein. At 2136, the clientmay use the results gate to access the results. For example, the resultsmay be on the service device, and the service may have generated aservice results gate. The client results gate may be generated tocommunicate with the service results gate, e.g. the URI of the serviceresults gate may have been included in the results advertisement.Alternatively, the service may have stored the results elsewhere in thedistributed computing environment and the client results gate may beconfigured to communicate with a results gate set up for the results.For example, the results may be on a space, and the client results gatemay communicate with a results gate on the space.

In FIG. 45 e, the service may create a results gate at 2140. The servicemay then send the results gate to the client (in a message) at 2142. Thereceived results gate may then be used by the client to access theresults. This embodiment frees the client from the responsibility ofsetting up the results gate.

To the client process that originally invoked the method, the process ofRMI as described herein is transparent. To the client process, itappears as if the method is being invoked locally, and that the resultsare being provided locally. Thus, the method gates, in combination withthe message passing mechanism, may allow “thin” clients to executeprocesses that would otherwise be too large and/or complex to execute onthe clients.

A Java platform method gate implementation example follows. The actualJava method gate implementation for any Java platform is defined in thedistributed computing environment platform binding. Each Java methodgate granting access to a result is actually a Java class instance (anobject) that implements the result's interface. For example, if theresult were an object of type Table, the result method gate class may bedefined as follows:

public class TableMethodGate implements Table { public Cell getNextCell(); }

The TableMethodGate object is cast to type Table before being returnedas the method invocation result. The process is recursive. That is, whenthe getNextCell method is invoked, a CellMethodGate class and objectinstance are generated to represent the getNextCell result:

-   -   public class CellMethodGate implements Cell { }

The choice of which gate type (message or method) to use with aparticular service is addressed in combination by the platform bindingand each service advertisement. Some platforms may not support methodgates. If a platform does support method gates, the binding may defineits precise implementation. Secondly, a service advertisement'sinterface may or may not lend itself to RMI-style programming. Thoseservice interfaces that do support a RMI-style programming model areflagged with the following XML attribute:

-   -   <MethodGateInterface=true>

Message gates may also support publish and subscribe message passing forevents. Message gates with event support may be referred to as eventgates. A service's XML schema may indicate a set of one or more eventsthat may be published by the service. An event gate may be constructedfrom the XML schema. The event gate may be configured to recognize someor all of the set of events published by a service, subscribe to thoseevents, and distribute each event as the event is produced by theservice.

Note that any combination of the gate functionality described above maybe supported in a single gate. Each type has been described separatelyonly for clarity. For example, a gate may be a message gate, a methodgate and an event gate, and may support flow control and resourcemonitoring

Service Discovery Mechanisms

In one embodiment, the distributed computing environment may include aservice discovery mechanism that provides methods for clients to findservices and to negotiate the rights to use some or all of a service'scapabilities. Note that a space is an example of a service. The servicediscovery mechanism may be secure, and may track and match outgoingclient requests with incoming service responses.

A service discovery mechanism may provide various capabilitiesincluding, but not limited to:

-   -   Finding a service using flexible search criteria.    -   Requesting an authorization mechanism, for example, an        authentication credential, that may convey to the client the        right to use the entire set or a subset of the entire set of a        service's capabilities.    -   Requesting a credential, document, or other object that may        convey to the client the service's interface. In one embodiment,        the service's interface may include interfaces to a requested        set of the service's capabilities.    -   The tracking of discovery responses to the original requests. In        one embodiment, each client request may include a collection of        data that may also be returned in matching responses, thus        allowing the requests and responses to be correlated.

In one embodiment, a distributed computing environment may include amechanism for clients to negotiate service access rights. In oneembodiment, the mechanism may be used to negotiate for a subset of aservice's full capabilities. The result of the negotiation may be anauthorization such as an authentication credential that conveys to theclient the right to use the requested subset of the service'scapabilities.

In one embodiment, the service discovery mechanism may allow a client torequest a security capability credential from a service. In oneembodiment, the client may present to the service a set of desiredcapabilities in the form of a protected (secure) advertisement. Theservice may then respond with a capability credential that may convey tothe client the rights to use the requested capabilities described in theprotected advertisement.

In one embodiment, the distributed computing environment may include amechanism for a client to negotiate service access rights and to thenobtain a security credential or document that may be used to present theservice's access interface to the set or subset of the service'scapabilities that were requested by the client.

In one embodiment, a client that receives a capability credential from aservice may generate a custom service access interface document that maybe referred to as a “complete advertisement.” In one embodiment, thecomplete advertisement may be an XML document. The generatedadvertisement may provide access to the service capabilities as grantedto the client by the received capability credential. In one embodiment,an interface may be provided by the advertisement only to the servicecapabilities to which the client has been granted access by thecapability credential. In one embodiment, the client may be grantedaccess to only required capabilities and to which the client has accessprivileges.

In one embodiment, the distributed computing environment may provide amechanism by which a client may negotiate capabilities with services. Inone embodiment, the client may negotiate its capabilities to theservice. The service may then customize results based on the parametersnegotiated with the client. For example, a client that is capable of onebit display at a resolution of 160×200 may negotiate these parameters tothe service, thus allowing the service to customize results for theclient.

The distributed computing environment may include a mechanism that mayallow clients to negotiate how a service is to return results of aservice invocation. In one embodiment, during a capability credentialrequest, a means by which to choose one of the results return methodsmay be conveyed to the service. The service may then generate a customservice advertisement that may convey to the client the resultsmechanism to be used, as well as the service interface.

Matching Component (Service) Interfaces

The distributed computing environment may provide a mechanism formatching a component (for example, a service) specification interfacewith a requested interface. For example, a client (which may be aservice) may desire a service that meets a set of interfacerequirements. Each component may have a description of the interface towhich it conforms. The specification interface matching mechanism mayallow a component that best matches a requestor's interface requirementsto be located. The specification interface matching mechanism may alsoallow for “fuzzy” matching of interface requirements. In other words,the mechanism may allow matching without requiring the exactspecification of all aspects of the interface, thus providing a nearestmatch (fuzzy) mechanism. In one embodiment, the specification interfacematching mechanism may be implemented as a multi-level, sub-classingmodel rather than requiring specification at a single interface level.

Using the specification interface matching mechanism, a basic desiredinterface may be compared to a set of component' interface descriptions.One or more components matching the basic desired interface may beidentified. The interface descriptions may include subclass descriptionsdescribing more specifically the interfaces provided by the components.In the search process, the class type hierarchy may be examined todetermine if a given class is a subclass of the search type. In oneembodiment, subclasses may inherit properties of the base class, andthus the subclass-specific information may not be examined in thisphase. Thus, the search may be performed generically. The identifiedcomponents may be searched at the next (subclass) level. The search maybecome specific to the subclass and may be performed by interpreting thesubclass information included in the interface description. The searchmay continue through one or more subclasses until one or more componentsis determined which may provide the nearest match to the requestor'sdesired interface.

Spaces

As mentioned above, the distributed computing environment relies onspaces to provide a rendezvous mechanism that brokers services orcontent to clients. FIG. 15 illustrates the basic use of a space 114.Service providers may advertise services in a space 114. Clients 110 mayfind the advertisements in a space 114 and use the information from anadvertisement to access a service using the XML messaging mechanism ofthe distributed computing environment. Many spaces may exist, eachcontaining XML advertisements that describe services or content. Thus, aspace may be a repository of XML advertisements of services and/or XMLdata, which may be raw data or advertisements for data, such as results.

A space itself is a service. Like any service, a space has anadvertisement, which a client of the space must first obtain in order tobe able to run that space service. A space's own advertisement mayinclude an XML schema, a credential or credentials, and a URI whichindicate how to access the space. A client may construct a gate from aspace service's advertisement in order to access the space. A client ofa space may itself be a service provider seeking to advertise in thatspace or modify an existing advertisement. Or a client of a space may bean application seeking to access a service or content listed by thespace. Thus, spaces may provide catalysts for the interaction betweenclients and services in the distributed computing environment.

A space may be a collection of named advertisements. In one embodiment,naming an advertisement is the process of associating a name string withan advertisement. The association may take place upon storing anadvertisement in a space. Removing an advertisement from a spacedisassociates the name from the advertisement. A space may be createdwith a single root advertisement that describes the space itself.Additional advertisements may be added to a space. An advertisement'sname may locate the advertisement within the space, including specifyingany necessary graphing information such as a hierarchy of names. In apreferred embodiment, the structure of a space is not dictated by thedistributed computing environment. That is, spaces may be structured as,for example, a flat un-related set of advertisements or a graph ofrelated advertisements (e.g. commercial database). Since, in a preferredembodiment, the distributed computing environment does not dictate how aspace actually stores its content, spaces may be supported by small tolarge devices. For example, a simple space may be tailored to fit onsmall devices, such as PDAs. More advanced spaces may be implemented onlarge severs employing large commercial databases.

As mentioned above, a space may contain advertisements for services inthe distributed computing environment. An advertisement may provide amechanism for addressing and accessing services and/or content withinthe distributed computing environment. An advertisement may specify aURI for a service. In some embodiments, the URI may allow for theservice to be accessible over the Internet. An advertisement may alsoinclude an XML schema for the service. The XML schema may specify a setof messages that clients of the service may send to the service toinvoke functionality of the service. The XML schema may define theclient-service interface. Together, the URI and the XML specified in anadvertisement may indicate how to address and access the service. Boththe URI and schema may be provided in XML as an advertisement in aspace. Thus, a mechanism for addressing and accessing a service in adistributed computing environment may be published as an advertisementin a space. Clients may discover a space and then lookup individualadvertisement for services or content.

FIG. 16 illustrates advertisement structure according to one embodiment.An advertisement 500, like other XML documents, may include a series ofhierarchically arranged elements 502. Each element 502 may include itsdata or additional elements. An element may also have attributes 504.Attributes may be name-value string pairs. Attributes may storemeta-data, which may facilitate describing the data within the element.

In some embodiments, an advertisement may exist in different distinctstates. One such state may be a drafted state. In one embodiment,advertisements may initially be constructed in a drafted state thatexists outside the bounds of a space. The creator of an advertisementmay construct it in a variety of ways, including using an XML editor.Access to elements and attributes in the drafted state may be at the rawdata and meta-data levels using any suitable means. Typically, eventsare not produced for changes made to advertisements in the draftedstate. Therefore, the creator of the advertisement may be free to add,change, or delete elements as well as to achieve the desired attributeset, and then publish the advertisement for the rest of the distributedcomputing environment to see.

In one embodiment, another possible state for advertisements is apublished state. Advertisements may move to the published state wheninserted into a space. Once the advertisement is in a space, interestedclients, and services may locate it, e.g. using its name and/or itselements as search criteria. For example, search criteria may bespecified as an XML template document that may be compared (e.g. by thespace service) with the advertisements in the space. Publishedadvertisements may represent “on-line” services ready for clients touse. The message address (URI) of the service may be stored as anelement in the advertisement. Advertisements that are removed from thespace may transition back to the drafted state where they may bediscarded or held. Removal may generate an event so interested listenersmay be made aware of the change. Message gates are typically createdfrom published advertisements.

In one embodiment, yet another possible state for advertisements is apersistent archived state. An archival procedure may turn a livepublished advertisement into a stream of bytes that may be persistentlystored for later reconstruction. Archived advertisements may be sent(e.g. in their raw XML form) from the space to an archival service. TheURI for an advertisement's archival service may be stored as an elementin the advertisement. XML may provide a format for storing andretrieving advertisements and representing the state of advertisementelements sufficient to reconstruct the advertisement object(s).Advertisements may be stored in other formats as well, depending onarchival service implementation. The process of making a publishedadvertisement persistent may prepare the advertisement for thepersistent archived state. Persistent advertisements may be stored (e.g.by an archival service) for future use in a persistent storage locationsuch as a file or a database. A space through the archival procedure mayenable advertisements to be stored, however the space does notnecessarily play a role in how persisted advertisement entries areactually stored. How persisted advertisements are stored may bedetermined by the advertisement's archival service. Typically, no eventsare generated on behalf of archived advertisements. Also, changes maynot be allowed for advertisements in the persistent archived state.

FIG. 17 illustrates one example of advertisement state transitions thatan advertisement may undergo during its lifetime. First, anadvertisement may be constructed, as indicated at 1. Duringconstruction, the advertisement is in the drafted state. Then, theadvertisement may be inserted in a space, as indicted at 2. Theadvertisement may be inserted as a published parent. The advertisementis in the published state after being inserted in a space. An event(e.g. AdvInsertEvent) may be generated when the advertisement isinserted in the space. Events are more fully discussed below. Theadvertisement may be archived and made persistent, as indicated at 3,which may transition the advertisement to the persistent archived state.An advertisement may also be published from the persistent archivestate, as indicated at 4. An advertisement may be removed from a spaceand transition back to the drafted state, as indicated at 5. An event(e.g. AdvRemoveEvent) may be generated when the advertisement isremoved.

In one embodiment, the archived, persistent state is not used. In thisembodiment, state changes 3 and 4 also are not used. In this embodiment,an advertisement is either in the drafted state or in the publishedstate.

Advertisements stored in a space may have the following standardizedelements and/or attributes: version (may be an element), creation date(may be an attribute), modification date (may be an attribute),implementation service URI (may be an element), and/or persistencearchival service URI (may be an element).

A space itself is typically a service. A space service may provide theability to search for advertisements in the space, which may includesearching the space by type of advertisements. A space service may alsoprovide facilities to read advertisements, write (publish)advertisements, and take (remove) advertisements. A space may alsoprovide the ability to subscribe for space event notification messages.Some spaces may provide extended facilities, such as facilities tonavigate space relationship graph by position; read, write or takeadvertisement elements; read, write or take advertisement attributes;and subscribe for advertisement event notification messages. Spacefacilities are described in more detail below. A space's capabilitiesare embodied in a space advertisement's message schema. From the messageschema, space address, and authentication credential, a client messagegate may be created to access the space and its facilities.

Spaces and all advertisements within a space may be addressed usingURIs. In one embodiment, space and advertisement names may follow URLnaming conventions. The use of URIs, e.g. URLS, for addressing spacesmay allow spaces to be addressable throughout the Internet, in someembodiments.

The space message recipient (a space service) may be specified using aURI which may have been received in a service advertisement for thespace. The URI may include a protocol, host, port number, and name. Theprotocol may name the protocol that may be used to move mes ages betweenclients and the space (reliable or un-reliable sockets, for example).The host and port number may be protocol dependent IDs. The name may bethe space name followed by advertisement, element and/or attribute name.In one embodiment, a pathname may be used to identify an advertisementin a space. Pathnames may be either absolute or relative. Absolutepathnames name the space as well as an advertisement. Relative pathnamesare relative a designated advertisement within an assumed space. In oneembodiment, the syntax rules governing the construction of pathnames isthat of the URI (Uniform Resource Identifier). In that embodiment,advertisement and space names therefore may not contain any URI reservedcharacters or sequences of characters. Pathnames to elements andattributes may also be specified using a URI. In general, element andattribute names may be appended to the pathname of an advertisement,such as:

-   -   http://java.sun.com/spacename/advertisement/element/attribute.

In one embodiment, the distributed computing environment may include amechanism that allows a client to discover the URI of a space butrestricts access to the service advertisement for the space. In oneembodiment, rather than returning the full advertisement to the space,the URI of the space and the URI of an authentication service for thespace may be returned. In order for the client to access the documentsor services advertised in the space, the client first may authenticateitself to the authentication service at the URI provided in the returnmessage. The authentication service may then return an authenticationcredential that may allow the client partial or full access to thespace. When the client receives the authentication credential, theclient may attempt to connect to the space to access the documents orservice advertisements in the space.

The distributed computing environment may provide a mechanism ormechanisms that may enable a client to connect to a space. Embodimentsof a connection mechanism may provide for client-space addressing,client authorization, security, leasing, client capabilitiesdetermination, and client-space connection management. A client-spaceconnection may be referred to as a session. In one embodiment, a sessionmay be assigned a unique session identification number (session ID). Thesession ID may uniquely identify a client-space connection. In oneembodiment, a session lease mechanism may be used to transparentlygarbage collect the session if the client does not renew the lease.

The following is an example of using such a connection mechanismaccording to one embodiment. A client may obtain an authenticationcredential. In one embodiment, the space may provide an authenticationservice in response to a client's request for access to the space. Theclient may obtain the authentication credential through theauthentication service. When the client receives the authenticationcredential, the client may initiate a connection to the space by sendinga connection request message. In one embodiment, the connection requestmessage may include the URI address of the space service, theauthentication credential for the client and information about theconnection lease the client is requesting. After the space receives theconnection request message, the space may validate the message. In oneembodiment, an XML schema may be used to validate the message. Theclient may then be authenticated using the authentication credential. Inone embodiment, the information received in the connection requestmessage may be used to determine the capabilities of the client to usethe space. In one embodiment, each client of a space may be assigned itsown set of capabilities for using the space. In one embodiment, anaccess control list (ACL) that may include capability information aboutone or more clients of the space may be used in client capabilitiesdetermination. In one embodiment, the information received in theconnection request message may be used to look up the client'scapabilities in the ACL.

After authenticating the client and determining the client'scapabilities, the connection lease to grant the client may bedetermined. After the lease is determined, the structure for maintainingthe client-space connection may be generated. A session ID for theconnection may be generated. In one embodiment, each client-spaceconnection may be assigned a unique session ID. In one embodiment, anactivation space may be created and assigned to, or alternatively apre-existing activation space may be assigned to, the client-spacesession. In one embodiment, an activation space may be used to storeresults of services for the client when using the space. In oneembodiment, a client's capabilities may be used to determine if anactivation space is to be created for the client. For example, a clientmay not have capabilities to access an activation space to store andretrieve results. A message or messages may be sent to the clientinforming the client that the connection has been established. Themessage or messages may include the session ID and information about thelease. The client may then use the space including, but not limited to:advertisement lookup, advertisement registering, and advertisementretrieval. In one embodiment, he connection may remain open until theallocated lease expires or until the client sends a message requestingtease cancellation to the space. In one embodiment, the client may beresponsible for renewing the lease before the lease expires. If thelease expires before the client renews the lease, the connection may bedropped, causing the client to lose the connection to the space. In oneembodiment, to reconnect, the client may be required to repeat theconnection procedure.

In one embodiment, a client of a space may obtain a space'sadvertisement several different ways. Some of the ways a client mayobtain a space's advertisement are illustrated in FIG. 18. For example,a space discovery protocol may be provided as part of the distributedcomputing environment. Space discovery is a protocol a client or servicemay use to find a space. A listener agent 202 may be configuredassociated with one or more spaces to listen for discovery requests. Thediscovery listener agent 202 may listen on various network interfaces,and may receive either broadcast requests or unicast requests (at theURI of the agent) from clients 200 a looking for a space(s). Thelistener agent 202 then responds with the service advertisement(s) orURIs for the service advertisements of the requested space(s). In oneembodiment, the listener agent is, in general, separate from the space,because its functionality is orthogonal to the functionality of a spaceservice. However, the listener agent may be implemented on the samedevice or a different device as a space service.

In one embodiment, the discovery protocol may be a service advertised ina default space. A client may instantiate the discovery protocol fromthe client's default space in order to discover additional spaces. Thediscovery protocol may be pre-registered with a client's default space.Alternatively, the discovery protocol may register itself with thedefault space by placing an advertisement in that space, e.g., when aclient connects to a local network serviced by the discovery service.

In one embodiment, the space discovery protocol may be mapped tounderlying device discovery protocols for other platforms, such as SLP,Jini, UPnP, etc. Thus, a client may use the discovery protocol of thedistributed computing environment to find services in otherenvironments. A bridge to these other environments may be provided andadvertisements provided services in these other environments so thatthey may be accessed by clients of the distributed computing environmentdescribed herein. Refer to the Bridging section.

For each advertised discovery protocol, the distributed computingenvironment may create a subsequent results space to hold the results ofthe discovery protocol. In one embodiment, space services in thedistributed computing environment may use the Multicast AnnouncementProtocol (multicast UDP) to announce themselves on a LAN. Thisinformation may be recorded by a listener agent. A device (either aclient or service) may use the Multicast Request Protocol (multicastUDP) to initiate discovery of a space manager. In one embodiment, thespace managers respond with information indicating the URI of theirrespective spaces. Alternatively, a listener agent may respond formultiple spaces. The discovery response may also include a short stringthat labels the each space (e.g. obtained from keywords of the space),and information that can be used to set up a TCP connection, forexample, with each space manager to perform operations on the respectivespace. Since the requesting device may receive responses from more thanone space manager (or multiple space listings from a listener agent),this information may help the client select which space it wishes toconnect to.

In addition to the multicast discovery described above, the discoveryservice may also perform discovery using unicast messaging (e.g. overTCP) that can be used to discover a space manager at a known address onthe network (e.g. the Internet, other WAN, LAN, etc). The unicastdiscovery message may include a request for a space service at a knownURI to provide its service advertisement. The multicast and unicastdiscovery protocols are defined at the message level, and thus may beused regardless of whether the devices participating in the discoverysupport Java or any other particular language.

The discovery protocol may facilitate the proliferation of clientsindependently of the proliferation of server content that supports thoseclients within the distributed computing environment. For example, amobile client may have its initial default space built into its localplatform. In addition to local services advertised in the default space,the mobile client may have services that search for additional spaces,such as a service to access the discovery protocol or a service toaccess space search engines.

In some embodiments, the multicast and unicast discovery protocols mayrequire an IP network. Although these discovery protocols meet the needsof devices that are IP network capable, there are many devices that maynot be directly supported by these discovery protocols. To meet theneeds of such devices in discovering spaces in the distributed computingenvironment, a pre-discovery protocol may used to find an IP networkcapable agent. The pre-discovery protocol may include the device sendinga message on a non-IP network interface requesting a network agent. Thenetwork agent may set up a connection between itself and the device.Once the connection between device and agent is set up, the agentparticipates in the discovery protocol on IP networks on behalf of thedevice for which it serves as agent. The network agent may also providean interface for the device to the distributed computing environment ingeneral. For example, gates may be constructed in the agent on behalf ofthe device for running services advertised in discovered spaces. See theBridging section.

Another way that clients may locate spaces in the distributed computingenvironment is by advertisement of a space in another space. A space isa service, thereforeso, like any other service, it can be advertised inanother space. As shown in FIG. 18, a client 200 b may find anadvertisement 206 in a first space 204 a for a second space 204 b. Space204 b may in turn include advertisements to additional spaces. Because aservice (implementing a space) may also act as a client, spaces mayexchange advertisements or chain together to provide a federation ofspaces, as illustrated in FIG. 19. Any number of spaces may be includedin the distributed computing environment. The number and topology ofspaces may be implementation dependent. For example, spaces implementedon an IP network might each correspond to a different subnet.

A third way a client may locate a space is through running a service208, as shown in FIG. 18. A service 208 may be run which returns as itsresults the service advertisements of space services. Since serviceadvertisements are XML documents and since the distributed computingenvironment may include the Internet, service 208 may be a Web-basedsearch tool. An example of such a service is the space look-up servicedescribed in conjunction with FIG. 4. In one embodiment, spaces withinthe distributed computing environment may be implemented as Web pages.Each Web page space may include a keyword that may be searched upon toidentify the Web page as a space in the distributed computingenvironment. The space may include other searchable keywords as well tofurther define the space. A client may connect to a search service 208and supply keywords to the search service in the form of XML messages.The search service may receive the keywords from the client and feed thekeywords to an Internet search engine, which may be a conventional orthird-party search engine. The search service may return the resultsfrom the Internet search engine to the client, either directly as XMLmessages or by reference to a results space. The results may be the URIsof spaces matching the search request. Alternatively, the search servicemay contact spaces identified by the search, obtain the serviceadvertisement for each such space, and return the space serviceadvertisements to the client, either directly as XML messages or byreference to a results space. The client may then select a space fromthe search results and construct a gate (by itself or through a proxy)to access the selected space. Once the selected space is accessed, theclient may look up service advertisements within that space, which maylead to additional spaces.

As described above, a space may be an XML-based Website, and as such maybe searched via Internet Web search mechanisms. A space may includeInternet searchable keywords. Some devices, such as small clientdevices, may not support an internet browser. However, such devices maystill perform Internet searches for spaces within the distributedcomputing environment. A device may have a program that accepts stringsof keywords, which may be sent to a proxy program on a server (e.g. asearch service). The proxy may send the strings to a browser-basedsearch facility (e.g. an internet search facility) to perform thesearch. The proxy may receive the output of the search and parse it intostrings (e.g. XML strings) representing each URI for the search resultsand send the response strings back to the client. Thus, a client maylocate spaces through the Internet without having to support a programsuch as a Web browser. More capable devices may avoid the use of a proxyand initiate an Internet-based search service directly.

A fourth way a client may locate a space is by obtaining or receivinginformation about a newly created empty space or a spawned space when anexisting space is spawned. An existing space may include an interfacefor spawning an empty space with the same functionality (e.g. same XMLschema) as the space from which it is spawned. Spawning of spaces isfurther described below.

Once a client of a space finds the advertisement of a space service,that client of the space may run the space service, as it would anyother service. Note that the client of the space service may be anotherservice (e.g. a service seeking to advertise in the space). In oneembodiment, as illustrated in FIG. 20, to run a space service, theclient of the space may first run an authentication service for thespace to obtain an authentication credential, as indicated at 300. Theauthentication service may be specified in the service advertisement ofthe space service. The client of the space uses the authenticationcredential, the XML schema of the space (from space's serviceadvertisement), and the URI of the space (from space's serviceadvertisement) to construct a gate for the space, as indicated at 302.The client of the space may then run the space service by using the gateto send messages to the space service. A first such message is indicatedat 304.

For embodiments employing authentication, when the space servicereceives the first message from the client, with the authenticationcredential embedded, the space service uses the same authenticationservice (specified in the service advertisement of the space service) toauthenticate the client, thus establishing its identity, as indicated at306. The space service may determine the client's capabilities and bindthem to the authentication credential, as indicated at 308.

As indicated at 310, a client of a space may run various spacefacilities by sending messages to the space service. In one embodiment,when a client of a space sends a request to the space service, it passesits authentication credential in that request, so the space service cancheck the request against the client's specific capabilities.

Each space is typically a service and may have an XML schema definingthe core functionality of the space service. The XML schema may specifythe client interface to the space service. In one embodiment, all spaceservices may provide a base-level of space-related messages. Thebase-level space functionality may be the basic space functionality thatis capable of being used by most clients, including small devices suchas PDAs. It may be desirable to provide for additional functionality,e.g. for more advanced clients. Extensions to the base-level space maybe accomplished by adding more messages to the XML schema thatadvertises the space. For example, in one embodiment, the base-levelmessages do not impose any relationship graph upon the advertisements.Messages, for example, to traverse a hierarchy of advertisements may bea space extension. Providing such additional functionality may be doneby providing one or more extended XML space schemas or schema extensionsfor a space. The extended schemas may include the base schema so thatclients of an extended space may still access the space as a base space.

In one embodiment, a base space service may provide a transientrepository of XML documents (e.g. advertisements of services, results ofrunning services). However, a base space service in one embodiment maynot provide for advanced facilities to support persistence of spacecontent, navigation or creation of space structure (e.g. hierarchy), anda transactional model. A mechanism for supporting persistence,hierarchy, and/or transactions is by extending the XML schema. Sinceextended spaces still include the base XML schema, clients may stilltreat extended spaces as base spaces, when just the base spacefunctionality is all that is need or all that can be supported.

In one embodiment, the base space may be transient. The base space maybe acceptable for many purposes. Service providers may register theirservices in various spaces. In one embodiment, services mustcontinuously renew leases on the publishing of information in thespaces. By this nature, the services advertisements may be transient inthat they may often be rebuilt and/or reconfirmed. However, it may bedesirable to provide for some persistence in a space. For example, aspace that has results may provide some persistence for users that wantto be sure that results are not lost for some time. In one embodiment,persistence may be provided for by specifying a space interface wherethe client may control which objects in the space are backed by apersistent store and manage the maintenance of that persistence store.The persistence interface may be specified with extended XML schema forthe space defining the interfaces for persistence.

In one embodiment, a base space may provide an interface where an XMLdocument may be added to a space and identified by a string. The basespace may not provide any hierarchy for the various so named XMLdocuments in the space. In embodiments where hierarchy support isdesired, additional interfaces may be defined (extending the XML schema)where a hierarchy can be specified by the user. Other interfaces may bespecified to navigate the hierarchy or navigate a relationship graph byposition. However, other users may still use the base space interfacesto access those same documents, without any hierarchy. Interfaces forother space structure may be provided for as well in extended spaceschemas.

Extended XML space interfaces may also be provided for space transactionmodels. For example, an extended space XML schema may be providedspecifying an interface for ACID transactions. ACID is an acronym usedto describe four properties of an enterprise-level transaction. ACIDstands for Atomicity, Consistency, Isolation, and Durability. Atomicitymeans that a transaction should be done or undone completely. In theevent of a failure, all operations and procedures should be undone, andall data should rollback to its previous state. Consistency means that atransaction should transform a system from one consistent state toanother consistent state. Isolation means that each transaction shouldhappen independently of other transactions occurring at the same time.Durability means that completed transactions should remain permanent,e.g. even during system failure. Other transaction models may also bespecified in extended space schemas.

Extended space schemas may be XML documents that specify the messageinterface (e.g. XML messages) for using extended space features,functionality or facilities. A space may have a base schema and multipleextended schemas. This may facilitate provided different levels ofservice to different clients depending upon the client authentication.

Various space facilities may be provided. In some embodiments, afacility may be provided for the establishment of a session with thespace. In one such embodiment, the rest of the space functionality isnot available until this is done. In other embodiments, the notion of asession is not provided for, or is optional and/or implementationdependent.

Another space facility may be to add or remove a service advertisementto or from the space. A space facility may also be provided for addingor removing an XML document (not an advertisement, but perhaps a resultin a space). The space service may check for uniqueness of an itembefore allowing the addition of the item. For example, each item addedto the space may be associated with a user-specified string thatidentifies the item and that may be used to check for the uniqueness ofthe item.

In one embodiment, a client may request a listing, tree or otherrepresentation of all services advertised in the space. The user maythen scroll or maneuver through the advertisements and select thedesired service. A space may also provide a look-up facility that allowsa client to search for a service by providing keywords or string names.In one embodiment, a space facility may provide a mechanism to look up aspace entry that has been added to the space. The look up facility maysearch by string to match for name, or wildcard, or even database query.The look up facility may return multiple entries from which the clientmay select one or perform a further narrowing search. In one embodiment,the look-up facility may provide a mechanism to locate a serviceadvertisement matching a particular XML schema. The client may indicatea particular XML schema, or part of a particular XML, to be searched forwithin the space. Thus, a service may be searched for within a spaceaccording to its interface functionality.

Another space facility that may be provided in the distributed computingenvironment is a mechanism that allows services and clients to findtransient documents based upon a typing model such as XML. The mechanismmay be a general-purpose, typed document lookup mechanism. In oneembodiment, the lookup mechanism may be based upon XML. The lookupmechanism may allow clients and services to find documents in general,including services through service advertisements.

In one embodiment, a space lookup and response message pair may be usedto allow clients and services to find XML documents stored within anetwork transient document store (space). The space may be a documentspace used to store a variety of documents. In one embodiment, thedocuments are XML documents or non-XML documents encapsulated in XML.Spaces are further described elsewhere herein. The lookup messages maywork on any kind of XML document stored in the space, including serviceadvertisements and device driver advertisements. In one embodiment, aclient (which may be another service) may use a discovery mechanism asdescribed elsewhere to find one or more document spaces. Then, theclient may use space lookup messages to locate documents stored in thespace.

The distributed computing environment may include a mechanism thatallows services and clients to subscribe to and receive events about thepublication of XML documents. Events may include the publication of andremoval of XML documents to and from a transient XML document repositorysuch as a space. In one embodiment, an event may be an XML document thatrefers to another XML document.

In one embodiment, a space event subscription and response message pairmay be used to allow clients and services to subscribe for eventsregarding documents that are added to or removed from a space. In oneembodiment, an event subscription may be leased using the leasingmechanisms described elsewhere herein. In one embodiment, a subscriptionmay be cancelled when the lease is cancelled or expires. In oneembodiment, a subscription may be renewed by renewing the lease to thesubscription.

In one embodiment, an event subscription message may include an XMLschema that may be used as a document matching mechanism. Documents thatmatch the schema may be covered by the subscription. In one embodiment,any document added to a space and that matches the XML schema maygenerate a space event message.

A space facility may also be provided to which a client may register (orunregister) to obtain notification when something is added to or removedfrom the space. A space may contain transient content, reflectingservices that at added and removed from the space. A mechanism may beprovided to notify a client when a service becomes available or becomesunavailable, for example. A client may register with an event service toobtain such notification. In one embodiment, a client may register to benotified when a service having a name matching a specified string or aschema matching a specified schema (or schema portion) is added ordeleted from the space. Thus, a query to register with the space eventnotification facility may be the same as or similar to that of theservice look up facility described above.

A space may provide a facility for a client to instantiate a serviceadvertised in the space. Service instantiation is the initializationdone that allows a client to be able to run a service. On embodiment ofservice instantiation is illustrated in FIG. 22. To instantiate aservice, a client may first select one of the service advertisementspublished in the space, as indicated at 320. The client may use thevarious facilities, such as the look up facility, provided by the spaceto look up the various advertisements in the space. Then the client mayrequest the space to instantiate the service, as indicated at 322.

In one embodiment, service instantiation may include the followingactions. After the client requests the space service to instantiate theselected service, as indicated at 322, the space service may then verifythe client is allowed to instantiate the requested service, as indicatedat 324. The space service may perform this verification by examining anauthentication credential included in the clients message. Theauthentication credential is the credential the client received when itestablished a session with the space service. The space service mayverify if the client is allowed to instantiate the requested serviceaccording to the client's authentication credential and capabilitiesindicated for that client. See the Authentication and Security sectionherein.

Assuming the client is authorized, the space service may also obtain alease on the service advertisement for the client with the lease requesttime specified by the client, as indicated at 326. Leases are furtherdiscussed below. The space service may then send a message to the clientwhich includes the allocated lease and the service advertisement of theservice, as indicated at 328. In one embodiment, the client may run anauthentication service specified in the service advertisement and obtainan authentication credential, as indicated at 330. See theAuthentication and Security section herein for more information on anauthentication service. Next, as indicated at 332, the client mayconstruct a gate for the service (for example, using the authenticationcredential and the XML schema and service URI from the advertisement).Refer to the Gates section herein. The above described communicationbetween the client and space service is performed using the XMLmessaging of the distributed computing environment. The client may thenrun the service using the constructed gate and XML messaging. Theservice may similarly construct a service gate for XML messagecommunication with the client.

Another facility provided by a space service may be the spawning orcreation of an empty space. This space facility may allow a client(which may be a service to another client) to dynamically create a newspace. In one embodiment, this space facility may include an interfacefor spawning an empty space with the same functionality (same XML schemaor extended schema) as the space from which it is spawned. This facilitymay be useful for generating (e.g. dynamically) spaces for results. Forexample, a client may spawn a space a request a service to place resultsor advertise results in the spawned space. The client may pass thespawned space URI and/or authentication credential to the service. Or aservice may spawn a space for results and pass the spawned space URIand/or authentication credential to the client. In some embodiments,once a space is spawned, it may be discovered just like other spacesusing one or more of the space discovery mechanisms described herein.

By using a mechanism in which a space may be created via an interface inanother space (e.g. a space spawning facility), new spaces may becreated efficiently. For example, in one embodiment, storage for thespawned space may be allocated using the same facility used by theoriginal space for storage. Also, a spawned space may share a commonservice facility with its original (or parent) space. For example, a newURI may be assigned to the new space. In one embodiment, the new URI maybe a redirection to a common space facility shared with the originalspace. Thus, a newly spawned space may use the same or some of the sameservice code as that of the original space.

Space facilities may also include security administration, for example,to update the various security policies of the space, and otheradministrative facilities. For example, the number and age ofadvertisements may be controlled and monitored by a root space service.Old advertisements may be collected and disposed. See, e.g., the Leasessection herein for when an advertisement may be considered old. Theservice implementing the space may be under the control of anadministrator. The administrator may set policy in a service dependentmanner.

As mentioned earlier (see FIG. 9 and accompanying text), spaces mayprovide a convenient mechanism for storing results from a service run bya client. Using a space for results may allow a small client to receivein pieces the results of running a service. Some services may generate alarge amount of results. By using a space to store the results from aservice, clients that do not have the resources to receive the fullresults at once may still use the service. Moreover, by using a space tostore results, a service running on a fast busy server may be freed frominteracting directly with a slow client when returning large results.Thus, the service may be freed sooner for use by other clients.

A space may provide a convenient mechanism for accessing a result bydifferent clients and/or at different times. For example, a client maynot be able to use the entire result, but a user may want to access therest of the result later using another client that can access it. Forexample, the result could be stock quote information, showing thecurrent price of a stock (accessible by a PDA), and showing a chart ofstock prices (accessible by a laptop later). Also, using a space in thedistributed computing environment for results may allow a client to feedthe result of one service into another service, without the necessity ofdownloading the result first. For example, in the case of the stockquote information above, the PDA could feed the chart into anotherservice, which prints the chart, without the PDA having to download thechart itself. Thus, a results space may provide a mechanism for a clientto pass to another client or service without the client having to handleor receive the results.

In different embodiments, the decision to use a space for results may bemandated by the service, mandated by the client, and/or requested by theclient. A service may suggest the use of a space for its results, e.g.,in its advertisement. In one embodiment, either the client or theservice may spawn a new space for results or use an existing space forresults. See the description herein regarding spawning spaces.

In one embodiment, the use of a space for results does not necessarilymean that the service must put all results in that space. There may bealternatives for any result a service generates. For example, part orall of the result may be sent in-line in a message to the client.Alternatively, the result may be put in the space, and then anotification message may be sent to client, referencing the result (e.g.including a URI to the result or to an advertisement for the result).Another option may be to put the result in the space, with notificationvia an event from the space. For example, the client and the service mayagree to call the result some particular name, and then the client mayregister with the space (using a space facility such as described above)to receive an event when a result so named is added to the space. Seethe description above on event notification.

Thus, several different mechanisms may be employed within thedistributed computing environment for a service to return results to aclient. The actual results may be returned to the client by value in anXML message, or results may be returned to the client by reference withthe actual results (or advertisement for the actual results) put in aspace and the client receiving a message referencing the results in thespace. Moreover, results, or results advertisements, may be placed in aspace and the client notified by event.

Another mechanism for handling results may be for the client to specifyanother service for the results to be fed to. For example, when a clientruns a service that will produce results, the client may instruct thatservice (e.g. through XML messaging) to send the results to anotherservice for further processing. This may involve the client indicatingthe URI of an advertisement for the other service so that theresult-producing service may generate a gate to the other service inorder to run the other service and pass it the results. In this example,the result-producing service may be a client of the other service. Insome embodiments, the client may send the schema or a pre-constructedgate to the result-producing service to access the service for furtherprocessing. An example of a service for further processing is a displayservice that may display the results for the original client. Thisdisplay service may be on or associated with the same device as theclient.

Result spaces and method gates may allow the distributed computingenvironment to provide a simple remote method invocation that ispractical for thin clients with minimal memory footprints and minimalbandwidth, because it need not have the adverse side effects of hugeprogram objects (along with needed classes) being returned (necessarily)across the network to the client as in conventional remote methodinvocation techniques. Instead, results may be returned to a resultspace, and only if desired (and if they can reside on the client) arethe actual objects downloaded to the client.

The mechanism by which the distributed computing environment may providefor remote method invocation is as follows (refer also to thedescription of method gates in the Gates section herein). An object maybe advertised (e.g. as a service or as part of a service) in a space.The advertisement includes a reference that contains the URI (e.g. URL)of the object, along with other access parameters, such as securitycredentials and XML schema. A client may have or may construct a clientmethod gate for the object, which for every method of the object (orservice) itself may have a wrapper method that takes the methodparameters and creates a request XML message to invoke a method of theobject. The XML message is sent to a service gate that invokes theactual method on the service object. When that method returns a resultobject, the service gate may post the result object in a results space,and may return a message to the client with a reference to the resultobject.

Thus, for a client to invoke a remote method, the client first sends amessage to instantiate an object (e.g. service), such as describedabove. In one embodiment, instantiation of an object may include thecreation or spawning of a results space. In another embodiment, resultsspace creation may be independent from the object instantiation.Instantiation may return the object URI to the client, and the clientand service gates may be dynamically created when a client requestsinstantiation. In some embodiments, a results space may already existand be advertised by the object (service). Some part or all of the gatesmay also have been preconstructed or reused.

Once a client has initiated an object, a local call of the appropriateclient method gate will affect a remote call to the actual remoteobject, as described above. The remote method invocation approach of thedistributed computing environment may be recursive, with objectreferences returned to the client, instead of the objects itself, whenthe client gate is called. Note that such returned objects may alreadybe instantiated. In some embodiments, the client may make a decision todownload an entire object itself, rather than just remotely invoke it.

A method or service invoked as described above may generate a child gatethat is associated with the results document. The method may return achild gate (or the schema, URI and credentials for the client toconstruct a child gate) for the references instead of the referencesthemselves. The client may then access the references through the childgate. The child gate may also be a method gate.

As described above, this remote method invocation provided by thedistributed computing environment allows the real result object(s) to bestored in a service results space (which also may be createddynamically, by a servlet for example). The results space may betemporary. The results space may act as a query results cache. Theresults cache may be patrolled by server software (garbage collector)that cleans-up old result areas. Distributed garbage collection may beemployed, as result spaces may fill up until hey are destroyed by aclient indicating it no longer needs the space, or by an administratoron a server setting appropriate limits.

Turning now to FIG. 23, an illustration of a default space 350 isprovided. The distributed computing environment may provide at least onedefault space so clients can find an initial set of advertisements. Adevice may have a default space that exists locally, with a built-inpre-constructed gate. The services advertised in that default space mayexist locally on that device, and they may provide system software thatenables or facilitates the device's participation in the distributedcomputing environment.

The default space 350 may include one or more mechanisms 352 to locateexternal spaces, as shown in FIG. 23. One service in the default spacemay run the space discovery protocol described above to find externalspaces. Also, external spaces may be advertised in the default space.Additionally, a service (e.g. a search engine or a proxy service to asearch engine) may be advertised in the default space that determines orfinds external spaces. Each space may be analogous to a file systemmount point. Thus, the distributed computing environment may providesearchable, dynamic mount points to services. A default space may be aclient's initial mount point to the distributed computing environment.

A default space or access to a default space may be built in to adevice. Through the default space and local services that may exist onthe device, a client execution environment for the distributed computingenvironment may be provided. A device's local services and default spaceservice may have built-in pre-constructed gates. One of the built-inservices listed in the default space may be a service to run thediscovery protocol so that the client may locate additional (e.g.external) spaces. A default space may include a built-in service thatprovides an execution environment for clients that allows the clientuser to browse spaces, select, and then instantiate services. Such aservice may provide a simple user interface that allows a client toentire strings (e.g. keyword for space searches), view or browse resultreferences (e.g. space listings, or service listings within a space),select items (e.g. to chose and instantiate a service), etc.

Devices that primarily provide a service may also include a defaultspace and may include a built-in service in the default space thatallows a service to manage advertising itself in various spaces. Forexample, a device, such as a printer, may have a built-in defaultservice that finds (perhaps through the discovery protocol) a space on alocal area network and adds an advertisement for the printer service tothat space. This service may also maintain the printer serviceadvertisement within the LAN space, for example, by renewing its leaseor updating the printer's XML schema, etc.

For some devices that provide a service, the overhead of finding a spaceto advertise its service and maintain that advertisement is undesirable.In one embodiment, rather than searching for and maintaining a space orspaces to publish service advertisements, services on some devices maytransmit their advertisements in response to connection requests. Forexample, a printer device with a printer service that is available on aproximity basis may not maintain an advertisement in a space (on thedevice or external to the device). Instead, when another deviceestablishes a connection with the printer device (for example, a userwith a laptop running a client desires to print a document), the printerservice may transmit the service advertisement to provide the XMLservice schema for connecting to and running the service that providesprinting functionality on the printer device. Also, some devices mayonly maintain advertisements for their services in a certain vicinity orlocal network. Such a device may not desire to support or may not haveaccess to transports for broader accessibility.

One example of a service device in which it may be desirable for thedevice to avoid or limit maintaining service advertisements in a spaceis a device whose functionality is available on a proximity basis.Proximity-based services may provide advertisements of theirfunctionality upon request. These advertisements may not be broadlyaccessible. For example, proximity-based services may be provided in awireless communications system. The term “wireless” may refer to acommunications, monitoring, or control system in which electromagneticor acoustic waves carry a signal through atmospheric space rather thanalong a wire. In most wireless systems, radio-frequency (RF) or infrared(IR) waves are used. Typically, in proximity-based wireless systems, adevice comprising a transceiver must be within range (proximity) ofanother device to establish and maintain a communications channel. Adevice may be a hub to connect other devices to a wireless Local AreaNetwork (LAN).

As mentioned, embodiments of the distributed computing environment mayto provide a mechanism using a lookup space that allows clients torendezvous with services. In a proximity computing environment, oneembodiment of the distributed computing environment may provide aservice discovery mechanism that clients may use to discover serviceswithout using lookup spaces as rendezvous points. An example of aproximity computing environment is an IrDA point-to-point communicationsenvironment. In a proximity computing environment, the proximitymechanism may find the “physical” location of the service for theclient. For example, in an IrDA environment, the client device may bephysically pointed at the device including the service(s) that theclient desires to use.

The proximity service discovery mechanism may enable the client todirectly look for service advertisements rather than sending a lookuprequest to a lookup space to look for service advertisements. Since theclient device may have established a proximity connection to the servicedevice, the client may directly request the desired service. Forexample, a PDA client device may establish a proximity connection to aprinter device; the client may “know” to request a printer serviceconnection on the printer device.

In one embodiment, the client may send a proximity service discoverymessage to the service device. The message may include information thatmay specify a desired service on the service device to which the clientdevice has a proximity connection. In one embodiment, a service on theservice device may respond to the proximity service discovery message,and may send to the client the service advertisement that the client mayuse to connect to the desired service. The proximity service discoverymessage may also include information that may be used to authenticatethe client and to establish the client's capabilities on the service.Using the received service advertisement, the client may establish agate to establish communication with the desired service.

Nevertheless, it may still be desirable to publish advertisements forservices that do not desire to or cannot maintain their advertisementsin a space that is broadly accessible. In one embodiment of adistributed computing environment, a device that establishes aconnection with a device that does not publish its serviceadvertisement(s), such as a proximity-based device, may publish serviceadvertisements received from the non-publishing device. For example, adevice that establishes a connection with a proximity-based device andthat has an alternate transport connection(s) may publish (or republish)service advertisements received from the proximity-based device in thealternate transport environment, thus allowing the proximity-baseddevice service(s) to be used by other devices (through the (re)publishedservice advertisements) which are outside the normal proximity range ofthe device.

The publishing device may locate a locally published serviceadvertisement for the proximity-based device through a discovery and/orlookup service, or alternatively the service advertisement may not bepublished by the local service device, but instead may be sent to thepublishing device by the local device upon the establishment of aconnection, as described above. In one embodiment, the republishedservice advertisement may be made available as long as the devicemaintaining the advertisement is connected to or able to connect to thelocal device. For example, if the publishing device is disconnected fromthe local device (for example, moves out of proximity range of thedevice), the service advertisement may be made stale or removed. A leasemechanism may be provided to allow the space containing theadvertisement to send lease renewal messages to the publishing device.The publishing device may verify its connection to the local device,thus allowing the space to detect when the local device is no longeravailable. Rules for how the service advertisements are republished maybe provided by the local device or by an administrative policy for thelocal vicinity (e.g. proximity area) or local network.

FIG. 24 illustrates an example of a device bridging proximity-baseddevices onto another transport mechanism to allow the services providedby the proximity-based devices to be accessed by devices outside theproximity range of the devices, according to one embodiment. Apublishing device 1404 may be connected to a network 1412, such as anEthernet LAN or the Internet, etc., and may establish and maintainproximity connections 1414 with proximity devices 1400 and 1404.Proximity connections may be wireless connections or wired LANconnections, for example. Proximity devices 1400 and 1402 may each senda service advertisement to the publishing device 1404 upon connection,or, alternatively, the publishing device may locate the serviceadvertisements using a discovery and/or lookup service for the proximityconnections. The publishing device 1404 may then make the servicesprovided by the proximity devices available to other devices 1408 and1410 on the network 1412 by republishing the service advertisements 1416and 1418 in space 1406. Space 1406 may be stored on the publishingdevice or on other devices connected to the LAN (including devices 1408and 1410).

Other devices on the LAN including devices 1408 and 1410 may thendiscover space 1406 and look up the republished service advertisements1416 and 1418 for the proximity-based devices, establish gates tocommunicate to those services (device 1404 may act as a proxy or bridge)on the proximity-based devices 1400 and 1402 using the XML messagepassing methods described previously, and send requests and receiveresults to the proximity devices. Publishing device 1404 may act as abridge between the network 1412 and the proximity connections 1414 tothe proximity-based devices.

Leases

Leases may be used in the distributed computing environment to deal withpartial failure, resource synchronization (scheduling), and to providean orderly resource clean-up process. Leases may help the overalldistributed system manage independent clients and services that may comeand go. The various resources that clients obtain from services(including space services) may be leased from those services. Ingeneral, not every resource can or needs to be leased. In oneembodiment, it is up to the implementation of each particular service todetermine which of its resources need to be leased. In particular,resources used by a large amount of clients simultaneously may not needleasing or instead may require custom leasing protocols. This class ofleasing may be left to the service provider. Custom protocols, such asthose to implement transactions for example, may be built upon the baseleasing scheme. In one embodiment, the base leasing model is a relativetime-based model.

Services may issue leases to clients and provide operations on thoseleases. In one embodiment, all such lease functionality of a service ispart of that service's XML schema. Thus, a client may use its gate(corresponding to the service and constructed for the service's XMLschema) to perform lease operations. In one embodiment, all servicesthat issue leases provide the following lease operations (only allowedby the owner of the lease): (i) renewing a lease (parameters specified:lease (e.g. lease ID, lease credential), new lease time requested), and(ii) canceling a lease (parameter specified: lease (e.g. lease ID, leasecredential)). In one embodiment, all leases are granted for a particularamount of relative time (duration of lease) that may be negotiated. Therequester may specify a certain amount of time (e.g. in seconds), andthe grantor may grant the lease for any amount up to that time. In oneembodiment, a −1 value may be used to specify an indefinite lease.

The leasing mechanism may provide a mechanism to detect service andclient failure. Leases may also provide a mechanism to provide sharedand exclusive resource access. In one embodiment, all service resourceseither have no lease (resource is not leased and therefore available), ashared lease (resource accessed by multiple clients), or an exclusivelease (resource is accessed by exactly one client at a time). In oneembodiment, all resources begin in the no lease state. A no lease statesignifies there is no current access to the underlying resource, andindicates that there is an interest in the resource remaining inexistence and thus available for leasing. The leasing level may beincreased from none to shared, none to exclusive, or shared toexclusive. Lease isolation levels may also be decreased from exclusiveto shared, exclusive to none, and shared to none. In one embodiment,clients may voluntarily increase or decrease the lease isolation level,or may be requested by the service to do so. A response message from theservice may indicate if the isolation level change was accepted.

Request-response message pairs may be employed to claim, release, andrenew a lease. Each message may be tagged using a reserved XML tag toindicate that the message is a leasing message. The complete compositionof the message isn't necessarily defined by the distributed computingenvironment. In such an embodiment, service developers may append custommessage content, as long as, the message is tagged as a leasing message.

In one embodiment, clients that use leased resources may be expected to:(i) claim the resource as shared or exclusive, (ii) release the resourceclaim (if requested or if finished with resource), and (iii) respond torenewal messages (with another claim at same or different isolationlevel). Renewal messages may be sent (e.g. in regular intervals) byservices to detect client failure cases. The interval (at which therenewal message is sent) may be service specific. If a response to therenewal message isn't issued after a specific amount of time (e.g. basedon a time noted in the service advertisement), a resource reclamationprocess may begin within the service, revoking the lease completely. Insuch an embodiment, renewal messages sent to clients should be handledin a timely fashion. FIG. 25 illustrates the use of renewal messagesboth between a client and an instantiated service and between a serviceprovider and a space service. Note that both cases may be considered asthe use of renewal messages between a client and a service, since aservice provider may be a client to a space's advertisement service.

Renewal messages may arrive in an “out of band” fashion that may beinconvenient for the client to handle. That is, the client cannotpredict when a renewal message will be sent from the service. Out ofband message handling may complicate the client's logic and increate itscomplexity. To solve this problem, an automatic lease renewal mechanismmay be implemented to relieve the client of the responsibility ofhandling the out of band messages, and thus reduce client complexity. Inthe automatic lease renewal mechanism, each gate (message, method,and/or event gate) may receive renewal messages and automaticallyrespond to them without help from the client. The default response to arenewal request is to claim the lease at its current level. Each messagegate may contain a single, set-aside renewal response message that isautomatically sent to the advertisement space service when the gatereceives the renewal message. This “out of band” message is handled onbehalf of the client, yielding a cleaner client programming model. Inone embodiment, the gate may allow clients to register lease eventhandlers to specify different isolation levels in the response message.

Standard leasing messages may be defined in the distributed computingenvironment. In one embodiment, additional leasing messages may bedefined by custom leasing models. In one embodiment, every service thatissues leases may specify a URI where renew and cancel leasing messagesmay be sent.

Leasing messages may include embedded credentials for authenticating thesender of the message. In one embodiment, a client may receive thecredential (e.g. authentication credential) from an authenticationservice at service instantiation and embed the credential in messagessent to the service. In one embodiment, the authentication service mayhave been specified in the service advertisement for the service. Theservice may then authenticate the credential when received in a messagefrom the client. In one embodiment, the service may send the credentialwhen first received to the same authentication service used by theclient to generate the credential. Thus, the issuing and embedding ofcredentials in leasing messages may be used to provide a secure leasingenvironment. For example, the embedding of a credential in a cancellease message may effectively prohibit anyone but the authorized,credentialed client (and the service issuing the lease) from cancelingthe lease. See the “Authentication and Security” section for moredetail.

FIG. 44 is a flow diagram illustrating a mechanism for leasingresources. In step 2000, a client may request a lease on a resourceprovided by a service. In one embodiment, leases may be time-based, i.e.granted for a period to the client. In another embodiment, leases may benon-time-based leases that are maintained until cancelled by the clientor the service. In one embodiment, the service may be a space service,and the resource may be a service advertisement for another service andleased to the client by the space service. In one embodiment, theservice may be a space service, the client may itself be a service, andthe resource may be the publishing of a service advertisement by thespace service on behalf of the client/service. In one embodiment, theclient may send a request message to the service that specified theresource and requests the lease on the resource. In one embodiment, themessage may specify a requested lease period. In one embodiment, aclient message gate may send the lease request message to the service onbehalf of the client. In one embodiment, the lease request message maybe an XML message.

In step 2002, the service may grant the lease on the resource to theclient. In one embodiment, the service may receive a lease requestmessage from the client. The service may then grant the lease on theresource. In one embodiment, the lease request message may include arequested lease period. In one embodiment, the service may grant thelease for a granted lease period less than or equal to the requestedlease period. In one embodiment, the requested lease period may be foran indefinite lease (i.e. the period does not expire). In thisembodiment, the lease must be cancelled by the client or service, as thelease itself does not expire.

The service advertisement provided to the client may be used inestablishing an initial lease of resource(s) provided by the service andrequested by the client during access of the service. In one embodiment,the lease on the resource may be granted at service instantiation time.In this embodiment, the client may not send a lease request message tothe service requesting the lease. In this embodiment, the service maygrant an initial lease on the resource or resources to the client wheninstantiated from the service advertisement. For example, a spaceservice may, in response to a request message from a client, instantiatea service from a service advertisement on the space service. The servicemay grant the client leases on one or more resources provided by theservice when instantiated without requiring the client to explicitlysend a message requesting the leases.

In step 2004, the client may request renewal of the lease. In oneembodiment, the service may send a lease renewal request message to theclient. In one embodiment, the lease renewal request message may be sentto the client prior to expiration of a previously granted lease period.The client may respond to the message with a lease renewal responsemessage to the service requesting renewal of the lease. In oneembodiment using time-based leasing, the lease renewal response messagemay include a requested lease period. In another embodiment usingnon-time-based leasing, the lease renewal response message may requestthat the lease be continued. In one embodiment, the client may return alease renewal response message that instructs the service that the leaseis no longer required. In one embodiment, the client may not send alease renewal response message, and the service might assume, when noresponse message is received by the service, that the client no longerrequires the lease. For example, the client may have been disconnectedfrom the network. This provides the service with a mechanism fordetecting non-used leases and for garbage collecting resources includingleasing resources.

In one embodiment, the service may not send a lease renewal requestmessage to the client. In this embodiment, the client may insteadmonitor a granted lease period and send a lease renewal message to theservice prior to the granted lease period expiring. The lease renewalmessage may specify the resource that is being leased and a requestednew lease period for the lease of the resource. In one embodiment, therequested lease period may be for an indefinite lease (i.e. the perioddoes not expire). If the client no longer desires the lease, the clientmay not send the renewal message, and thus may abandon the lease.

In one embodiment, a client message gate may handle lease renewal onbehalf of the client process, thus freeing the client process fromresponsibility of handling lease maintenance. In one embodiment, theclient message gate may automatically respond to lease renewal requestmessages send from the service. In one embodiment, a default leaserenewal response message may be compiled into the gate and automaticallysent to the service upon the gate receiving the lease renewal requestmessage. In another embodiment, the service may not send lease renewalrequest messages. In this embodiment, the client gate may automaticallysend lease renewal messages. In one embodiment, the automatic sendingmay be performed periodically. In one embodiment, the client messagegate may monitor a currently granted lease period and may send a leaserenewal message prior to the currently granted lease period expiring.

In one embodiment, a lease may be at one of several access levelsincluding exclusive access and shared access. Exclusive access gives theclient exclusive rights to the resource, prohibiting other clients fromaccessing the resource for the duration of the lease. Shared accessgives other clients the right to contemporarily lease the same resourceas the client, that is, to obtain a lease to the resource that overlapsthe period of the lease held by the client. In one embodiment, theclient may hold a lease at one access level, and may send a leaserenewal message requesting the lease at another access level.

In step 2006, the service, subsequent to receiving a lease renewalmessage from the client, the service may grant renewal of the lease ofthe resource to the client. The lease renewal message may have been sentin response to a lease renewal request message sent from the service tothe client or may have been sent automatically by the client prior to apreviously granted lease period expiring. In one embodiment, the leasemay be granted for a granted lease period. In one embodiment, the leaserenewal message may have requested a lease renewal period. In oneembodiment, the granted lease period may be less than or equal to therequested lease period. In one embodiment, the service may deny thelease renewal request by the client. For example, the client may haveexceeded a maximum cumulative lease time, or another client may requireexclusive lease access to the resource. In one embodiment, the servicemay grant the lease for less than the requested lease period. In oneembodiment, the service may send a message to the client to inform theclient if the lease has been renewed. In one embodiment, the message mayinclude the granted lease period.

In step 2008, the client may send a message to the service requestingcancellation of the lease. The message may specify the resource forwhich the client has a lease to be cancelled. In step 2010, the servicemay cancel the lease. The service may cancel the lease in response toreceiving a cancel lease request message as described in step 2008. Inone embodiment, the service may also cancel the lease if a granted leaseperiod expires without receiving a lease renewal message from theclient. The service may also cancel the lease for a variety of otherreasons. For example, another client may request exclusive access to theresource, or the resource may become unavailable. In one embodiment, theservice may send a message to the client to inform the client if thelease has been cancelled.

In one embodiment, a security credential, such as an authenticationcredential described below, may be included in lease messages sentbetween the client and service as described in FIG. 44. For example, theclient may embed the security credential in lease renewal and leasecancel request messages sent to the service. The service, upon receivinga message, may examine the credential to verify it is from theleaseholder, and thus to verify the authenticity of the message. Thisprovides security in the leasing mechanism by preventing entities nothaving the proper credentials from modifying the client's currentlease(s) with the service.

In one embodiment, the lease messages sent between the client and theservice may all be in a data representation language. In one embodiment,the data representation language may be eXtensible Markup Language(XML). In one embodiment, all messages may be sent and received by aservice message gate and a client message gate. In one embodiment, thelease messages may be described in an XML message schema provided to theclient and used to construct the client message gate. In one embodiment,the XML message schema may have been acquired by the client in a serviceadvertisement, for example, retrieved from a space service.

A space service may use leases to manage the resources its facilitiesprovide to clients (including other services) of the space. For example,when a client desires to use a service, the space service may request alease for the client as part of service instantiation. Serviceinstantiation may be performed to allow a client to run a service. Toinstantiate a service, a client may first select one of the serviceadvertisements published in a space. The client may use the variousfacilities provided by the space to look up advertisements in the space.Then the client may request the space to instantiate the service. Thelease acquired during service instantiation is on use of the serviceadvertisement (not the same as the lease on publishing of the serviceadvertisement). It should be noted that the space service may allowmultiple clients to have a lease on use of a service advertisement ifthe advertisement has an indication it is shared. Otherwise, the spaceservice only allows one client at a time to have a lease on the serviceadvertisement (exclusive).

Another example of how a space service may uses leases to manage theresources its facilities provide to clients is when a client of thespace registers to be notified when XML documents (e.g. serviceadvertisements) are added or removed from a space. The registeringclient of the space may obtain a lease on this subscription tonotifications. This lease enables the space service to know whether tocontinue sending notifications. Such a lease may not be necessary when aclient has established an active session with the space. Also, note thatwhen a client of a space (could be a service) establishes a session withthe space, the client may obtain a lease on the session. This allows thespace to manage any resources associate with the session.

In another embodiment, the distributed computing environment may employa leasing mechanism that is not time-based. The lease may be generatedwhen an object is claimed for use. Instead of a time-based mechanism,the claim method may accept a callback that notifies the currentleaseholder that some other party wishes access the same object (e.g.service). Thus, as an alternative embodiment to time-based leases,instead clients may make claims on space objects (e.g. services). Whenanother client desires a lease that is incompatible with the currentleaseholder's, the service may send a “callback message” to the client.Upon receiving the callback message, the client (i.e. client gate) mayinvoke a callback method to decide on a response to the callback message(keep the lease, cancel the lease, change the access level to shared,etc.). Once a response has been determined, the client gate sends aresponse message to the service. This distributed mechanism for managingleases may be implemented using the XML message-passing layer.

Authentication and Security

The distributed computing environment provides for spontaneous andheterogeneous distributed systems based upon an asynchronous messagepassing model, where data and/or objects may be represented in arepresentation language such as XML. In the distributed computingenvironment, clients may connect to services throughout the Internet,for example. The distributed computing environment may enable largenumbers of network devices to work together in a reliable, dynamic, andsecure fashion. The distributed computing environment may define aprotocol that substantially enables interoperability between compliantsoftware components (clients and services).

In the context of the distributed computing environment, a device may bea networking transport addressable unit. Clients and services may beimplemented as Universal Resource Identifier (URI) addressable instancesof software or firmware that run on devices.

Internet space is inhabited by many points of content. A URI is a methodused to identify any of those points of content, whether it be a page oftext, a video or sound clip, an image, software, firmware or otherInternet content. The most common form of URI is the Web page address,which is a particular form or subset of URI called a Uniform ResourceLocator (URL). A URI typically describes the mechanism used to accessthe resource, the specific computer that the resource is housed in andthe specific name of the resource (typically a file name) on thecomputer.

Clients and services (both may be implemented on devices as softwareand/or firmware) may be connected over the Internet, a corporateintranet, a dynamic proximity network, within a single computer, or byother network connection models. The size and complexity of the devicessupporting clients and services may range, for example, from a simplelight switch to a complex, highly available server. Example devicesinclude, but are not limited to: PDAs; cellular phones; notebook,laptop, and more powerful PCs; and more powerful computer systems, up toand including supercomputers. In some embodiments, the distance,latency, and implementation of clients and services may be abstracted,with a common discovery and communication methodology, creating a “blackbox” effect. This definition approach allows software implementationissues to be dealt with by the underlying platform, yielding a looselycoupled system that may be scaled to Internet proportions.

The distributed computing environment may provide an Internet-centricprogramming model including WEB and XML content representation, dynamicdevice discovery, and secure device communication that is accessiblefrom a wide range of network devices. The distributed computingenvironment may include a network programming model abstracted above theCPU level. The programming model may include the following properties:

-   -   URI addresses    -   Strongly typed data called content (addressed with URIs)    -   Substantially unlimited amount of persistent content storage        (e.g. stores), (containing XML and non-XML content, such as that        identified by MIME types)    -   Substantially unlimited amount of transient content memory        called spaces (containing XML content)    -   Descriptive XML metadata (data about data) content        advertisements that may be stored in a space to notify        interested clients.    -   A substantially unlimited number of instructions (embodied as        messages)    -   Secure message endpoints (gates) addressed by URIs    -   Data flow support (event messages) to coordinate work flow        between distributed software programs.

Services and clients may run as programs within the distributedcomputing environment. Services may advertise their capabilities toclients wishing to use the service. Clients may or may not reside withinthe same network device, and that device's code execution environmentmay or may not support the Java platform.

Using URIs to address content and message endpoints gives thedistributed computing environment a powerful addressing scheme. Theaddress may specify the location of the content or endpoint, and mayspecify the route (or transport protocol) to be used. Items addressedusing URIs also may have an associated security credential. The securitycredential may be used to control what clients are allowed access to theitem, as well as which operations authorized clients are allowed toperform on that item.

The high degree of access provided by the distributed computingenvironment may be controlled by appropriate authentication and securitysystems and methods. Authentication and security in the distributedcomputing environment may include, but are not limited to: verifying thetyping correctness of XML content in a message; securely identifying thesender to the receiver; a mechanism to check the integrity of messagessent from a client to a service and vice versa; and a mechanism ofdescribing a service's set of accepted messages to a client andenforcing the message requirements on messages received at the service.The above listed security and authorization features may be leveraged ina single, atomic unit of code and data. The atomic unit of code and datamay be dynamically created. In one embodiment, once created, the atomicunit of code and data may represent a message endpoint (gate), and maynot be altered as to the security and authorization policies implementedduring creation.

A gate may represent the authority to use some or all of a service'scapabilities. Each capability may be expressed in terms of a messagethat may be sent to a service. Gates may also be used for failure casedetection when a client leases resources.

Authentication and security may also include a mechanism for verifyingthat a client attempting to use a service is authorized to use theservice; that the space from which the client receives the serviceadvertisement from is authorized to provide the service advertisement;and/or that the service advertisement itself is authorized.

Message passing may be implemented in a messaging layer as the means ofcommunicating requests from clients to services and of the servicesresponding with results to the clients. The messaging layer of thedistributed computing environment may substantially guarantee that validXML messages are sent, and may provide mechanisms enabling alanguage-independent security model. In the messaging layer, a sendingmessage endpoint may be linked to a receiving message endpoint. The twoassociated message endpoints may provide a secure, atomic,bi-directional message channel suitable for request-response messagepassing between a client and a service.

In embodiments of a distributed computing environment, an advertisementmay be published in a space for a service. An advertisement may be anXML document that includes the XML schema and URI of the service. Theservice may also include a service ID token or credential in theadvertisement, and may specify in the advertisement an authenticationservice to be used by both the client and the service. A client may thenlocate the service advertisement on the space, and use the advertisementto instantiate a message gate on the client. The client may use theauthentication service specified in the advertisement to obtain anauthentication credential for sending in messages to the client. In oneembodiment, the client may pass the service ID token or credential fromthe service advertisement to the authentication service, and theauthentication service may then use the service token or credential togenerate the authentication credential for the client. In oneembodiment, the client may include a gate factory that receives thenecessary information to create the message gate, and the gate factorymay construct the message gate and communicate with the authenticationservice to obtain the authentication credential for the client. Acorresponding service message gate may be instantiated at the service.

The client, at some point, sends a first message to the service. In oneembodiment, the client message gate may embed the client'sauthentication credential constructed by the authentication service inthe message. When the service receives the message, it may use the sameauthentication service to verify the authentication credential receivedin the message. By sharing the same authentication service, any of avariety of authentication protocols may be employed, with the details ofgenerating the authentication credentials separated from the client andthe service. Thus, a client may use different authentication credentialprotocols with different services.

In one embodiment, the authentication service may determine thecapabilities of the client (e.g. what the client is allowed to do on theservice) upon first receiving the client authentication credential fromthe service. The capabilities of the client may be bound to the client'sidentity. Then, the client's message gate may embed the authenticationcredential in every message sent from the client to the service. Themessages may be received by the service message gate and then checked bythe authentication service to ensure that the message is from the clientand that the message request is within the capabilities of the client.In another embodiment, capability determination and message checking forcapabilities may be handled by the service message gate without usingthe authentication service.

The client and service message gates may work together to provide asecure and reliable message channel. The gates may serve as securemessage endpoints that allow the client to run the service by sendingand receiving secured, authorized XML messages to and from the service.

Operations in the distributed computing environment may be embodied asXML messages sent between clients and services. The protocol used toconnect clients with services, and to address content in spaces andstores, may be defined by the messages that can be sent between theclients and services. The use of messages to define a protocol mayenable many different kinds of devices to participate in the protocol.Each device may be free to implement the protocol in a manner bestsuited to its abilities and role.

A service's capabilities may be expressed in terms of the messages theservice accepts. A service's message set may be defined using an XMLschema. An XML message schema may define each message format using XMLtyped tags. The tag usage rules may also be defined in the schema. Themessage schema may be a component of an XML advertisement along with theservice's message endpoint (gate) used to receive messages. Extensions(more capabilities) may be added to services by adding messages to theXML message schema.

In the distributed computing environment, authorized clients may be ableto use all of a service's capabilities, or may be limited to using asubset of the service's capabilities. In one embodiment, once a set ofcapabilities has been given to a client, the client may not change thatset without proper authorization. This model of capability definitionmay allow for services levels that run from a base set of capabilitiesto an extended set.

Service instantiation may be performed to allow a client to run aservice. To instantiate a service, a client may first select one of theservice advertisements published in a space. The client may use thevarious facilities provided by the space to look up advertisements inthe space. Then the client may request the space to instantiate theservice. Service instantiation may include, but is not limited to, thefollowing steps:

-   -   1. Client requests space service to instantiate a service.    -   2. Space service verifies client is allowed to instantiate the        service.    -   3. Space service obtains a lease on the service advertisement        for the client with the lease request time specified by the        client. Alternatively, the service advertisement may be provided        to the client without using the leasing mechanism.    -   4. Space service sends a message to the client that includes the        lease allocated in steps 3, and the service advertisement of the        service.    -   5. Client runs the authentication service specified in the        service advertisement, and obtains an authentication credential.    -   6. Client constructs a client message gate for communicating        with the service.

In order to provide trust between clients and services in thedistributed computing environment, a series of dynamically generatednumbers (keys, or tokens) may be used as security or authenticationcredentials for clients. One or more credentials may be used to verifythe right of a client to use a service and to verify messages betweenthe client and the service. Each client and service may have a uniquecredential.

The type of authentication credential needed to use a service may bereturned to the client conducting a service search. In one embodiment,an authentication credential is an opaque object that must be presentedeach time a client uses a service. In one embodiment, the authenticationcredential may be presented by a message gate on behalf of a client inevery message sent to a service. No matter what kind of authenticationcredential is required by a service, by using an authentication serviceexternal to the client and the service, the client and the service maynot need to be aware of the authentication credential structure or ofthe authentication process.

An authentication credential may also include a transport-specificticket in addition to the service ticket. When running a service,depending upon the networking transport specified in the serviceadvertisement, the transport may provide a secure connection. In somecases, if the data link layer is already secure, it may not be necessaryto use a secure transport over the already secure data link layer.

The concept of an authentication credential is abstract enough to allowvarious levels of security based upon credential implementation. Levelsof security may include, but are not limited to:

-   -   1. None (no message security—credential is empty or no        credential)        -   Messages with empty credentials or no credentials may be            sufficient when security is enforced by the physical            connectivity properties of the transport. For instance, a            smart light switch connected to just one light switch            controller is secure because the switches are wired in a            secure manner.    -   2. Signed messages (digital signatures)        -   Signed messages may include a digital signature that enables            the service (receiving the message) to verify the origin            (client) of the message.    -   3. Encrypted messages (transport may handle this)        -   Encrypted messages add another level of security by            scrambling the message contents so that another credential            is required to unscramble it.    -   4. Capability messages (service functionality and user aware)        -   This level of security may provide for security capabilities            on a user-by-user basis (e.g. what the user is allowed to            do), and may allow for fine-grained access control to            services and individual service functions.

Multiple levels of security zones may be used, due to the heavyweightimplementation necessary to enforce the higher levels of security(capabilities & encryption). If the message transport supports (or helpssupport) these security levels, the support may be leveraged to providesecurity level bridge services that bridge one level of security toanother.

As mentioned above, services without any security model may accept emptyauthentication credentials. For services that do not restrict access, agate may be built without an authentication credential or with an“empty” authentication credential. The gates for such services may notsend an authentication credential with each message, or may send anempty credential. The authentication service is one example of a servicethat may not restrict access. Other services may require a user andpassword pair.

Authenticating Service Access using Credentials

In some embodiments, a mechanism for verifying that a client attemptingto run a service is an authorized client, for verifying that the serviceadvertisement received by the client is an authorized serviceadvertisement, and/or for verifying that the space from which the clientreceived the service advertisement is authorized may be based upon apublic key/private key asymmetric cryptographic mechanism. In thismechanism, an authorized sending entity may embed a public key in amessage and encrypt the message including the public key with itsprivate key. An entity receiving the encrypted message may decrypt themessage using the public key and find the same public key embedded inthe decrypted message, and thus verify that the message is from theauthorized entity, since only that entity has the private key necessaryto encrypt the message. Thus, an entity may issue a credential that issubstantially unforgeable, and that other entities may decrypt (with theappropriate public key) to verify messages sent by the entity.

A public key may be defined as a value provided by some designated,trusted authority as a key that, combined with a private key derivedfrom the public key (or vice versa), can be used to effectively encryptand decrypt messages, and that may also be used as a digital signature.The use of combined public and private keys is known as asymmetriccryptography. Given a private (encryption) key it is computationallyinfeasible to determine the decryption (public) key (and vice-versa).

In one embodiment, messages in the distributed computing environment mayinclude several layers of encrypted public keys for authorizing theentities in the client-service communications model. In one embodiment,a service may build a credential C1 including its public key X1. Theservice may then encrypt the credential using its private key Y1. Theservice may include the encrypted credential C1 in a space as part ofits service advertisement. The space then may build a new credential C2including credential C1 and the space's public key X2. The space maythen encrypt the credential C2 with its private key Y2. When a clientrequests the service from the space, the space sends the serviceadvertisement and credential C2 to the client. When the clientconstructs a gate, it has the gate send messages to the serviceincluding another credential C3 which includes encrypted credential C2and the client's public key X3. C3 may be encrypted using the client'sprivate key Y3 prior t sending. The client's public key X3 and thespace's public key X2 may also be sent with the messages. In oneembodiment, the space's public key X2 may be included in C3, and thusencrypted in C3. In this embodiment, the client's public key X3 may besent unencrypted in the messages. In another embodiment, the client'spublic key X3 and the space's public key X2 may be sent unencrypted inthe messages.

After the gates are created, in one embodiment, the client may send amessage including encrypted credential C3 and public key X3 to theservice. In one embodiment, the space's public key X2 may be included inC3. In another embodiment, public key X2 may be included (unencrypted)in the message external to C3. When the service receives the message, itmay decrypt credential C3 using the received client's public key X3 andcheck the public key X3 embedded in the decrypted credential C3 againstthe received public key X3 used to decrypt the message, thus verifyingthe message is from an authorized client. The service may then decryptcredential C2 (extracted from decrypted credential C3) with the space'spublic key X2, and check the public key X2 embedded in the decryptedcredential C2 against the space's public key X2, thus verifying that thespace credential C2 came from an authorized space. In one embodiment,the space's public key X2 may have been included in credential C3. Inanother embodiment, the space's public key X2 may have been included inthe message, external to C3. In yet another embodiment, the service mayobtain the space's public key X2 elsewhere, for example, from the spaceitself. Finally, the service may decrypt credential C1 (extracted fromdecrypted credential C2) with the service's public key X1, and check thedecrypted credential to verify that the credential was created by theservice (the credential should include the public key of the service).

FIGS. 49 a-49 c are flow diagrams illustrating embodiments of amechanism for ensuring authorized use of a service in a distributedcomputing environment. FIG. 49 a illustrates embodiments of a mechanismfor generating credentials in advertisements to be used in authorizinguse of a service. A service in the distributed computing environmentgenerates a service credential containing the service's public key asindicated at 1900. In one embodiment, the service credential may includeother information in addition to the public key. The service may encryptthe service credential using its private key as indicated at 1902.

The service may include the encrypted service credential in a serviceadvertisement, and may publish the service advertisement on a spaceusing the advertisement publishing facilities provided by a spaceservice as indicated at 1904. The space service may generate a newcredential containing the space service's public key and the servicecredential from the advertisement as indicated at 1906. The spaceservice may encrypt the new space service credential using the spaceservice's private key as indicated at 1908. The space service mayreplace the service credential in the advertisement with the encryptedspace service credential as indicated at 1910.

FIG. 49 b illustrates embodiments of a mechanism for generating messagesincluding credentials on a client in the distributed computingenvironment. The client may access the service advertisement from thespace using the space service as indicated at 1920. In one embodiment,the service advertisement may be used to generate a message endpoint(gate) for sending secure messages including a credential to theservice.

The client may generate a client credential containing the encryptedspace service credential from the service advertisement and the publickey of the client as indicated at 1922. In one embodiment, the spaceservice's public key may also be included in the client credential. Theclient may then encrypt the client credential using the client's privatekey as indicated at 1924.

The client may generate a message including the encrypted clientcredential and the client's public key as indicated at 1926. In oneembodiment, the message may also include the space service's public key(previously provided to the client by the space service). In anotherembodiment, the client credential may include the space service's publickey. In one embodiment, the generated message may be a request messagefor accessing some function provided by the service. The client may thensend the generated message to the service. In one embodiment, a clientmessage endpoint (gate) may be used to send the message to the service.In one embodiment, the client message endpoint may generate the messageand send the message. In another embodiment, the client may generate themessage, and the client message endpoint may attach the encrypted clientcredential and public keys of the client and space service to themessage and send the message to the service. In one embodiment, theclient message endpoint may have been generated in accordance with theservice advertisement obtained from the space service. In oneembodiment, the message may be in a data representation language. In oneembodiment, the data representation language may be eXtensible MarkupLanguage (XML). For more information on message endpoints, see theMessage Gates section of this document.

FIG. 49 c illustrates embodiments of a mechanism for receiving andverifying messages including credentials on a service in the distributedcomputing environment. The service may receive a message sent to theservice by the client (for example, as described at 1926 of FIG. 49 b)as indicated at 1930. The service may decrypt the encrypted clientcredential included in the message using the client public key from themessage as indicated at 1932. The service may then verify the clientcredential as authentic by comparing the client public key used todecrypt the client credential with the client public key in thedecrypted client credential as indicated at 1934. If the two copies ofthe client public key are the same, then the service is assured that theclient who sent the message also generated the credential and istherefore an authenticated client, since only the client has the privatekey to encrypt its credential.

The service may decrypt the encrypted space service credential includedin the decrypted client credential using the space service public key asindicated at 1936. In one embodiment, the space service's public key mayhave been included in the client credential. In another embodiment, thespace service's public key may have been included in the message,external to the client credential. In yet another embodiment, theservice may obtain the space service's public key elsewhere, forexample, from the space service itself. The service may then verify thespace service credential as authentic by comparing the space servicepublic key used to decrypt the space service credential with the spaceservice public key in the decrypted client credential as indicated at1938. If the two copies of the space service public key are the same,then the service is assured that the space service is an authenticatedspace service accessed by the client, since only the space service hasthe private key to encrypt its credential.

As indicated at 1940, the service may decrypt the encrypted servicecredential included in the space service credential decrypted asindicated at 1936 using the service's public key. The service may thenverify the service credential as having been generated by the service bycomparing the service public key used to decrypt the service credentialwith the service public key in the decrypted service credential asindicated at 1942. If the two copies of the service public key are thesame, the service may be assured the service credential is the sameservice credential provided to the space service with the serviceadvertisement as indicated at 1904 of FIG. 49 b. In one embodiment, thegenerated message may be a request message for accessing some functionprovided by the service, and the service may perform the function onbehalf of the client subsequent to verifying the embedded credentials.

In one embodiment, the client and/or space service public keys may alsoserve as digital signatures, and the service may provide the keys to anauthentication service for verifying the client and/or the spaceservice. In one embodiment, 1930-1942 of FIG. 49 c may be performed by aservice message gate on behalf of the service, thus alleviating theservice of the task of message and client authentication.

Various key generation algorithms may be used in the distributedcomputing environment. The composition of keys may be hidden from bothclients and services; thus, the client and service may not care what keygeneration algorithm is used.

A Kerberos ticket is one example of a security credential that may beused in the distributed computing environment. Kerberos is a securemethod for authenticating a request for a service in a computer network.Kerberos lets a user request an encrypted “ticket” from anauthentication process that can then be used to request a particularservice. The user's password does not have to pass through the network.

Mechanisms may be provided by the distributed computing environment tosubstantially guarantee that messages sent between clients and servicesare not compromised. In one embodiment, a sender may embed a tokencontaining information that may be used by the receiver to verify thatthe message has not been altered. There are several methods forgenerating the information to embed in the message. In one embodiment, ahash of the message may be computed and sent with the message.

Hashing may include the transformation of a string of characters into ausually shorter fixed-length value or key that represents the originalstring. Upon receiving the message, the receiver may recompute the hashand check it against the sent hash. If the message has been altered, itis highly unlikely that the same hash will be generated. The sender mayencrypt the hash and send the corresponding public key in the encryptedmessage to substantially ensure that the hash is not compromised.

In other embodiments, an error detection scheme such as cyclicredundancy checking may be used. Cyclic redundancy checking is a methodof checking for errors in data that is transmitted on a communicationslink. In an embodiment using cyclic redundancy checking, the senderapplies an n-bit polynomial to the message and appends the resultingcyclic redundancy code (CRC) to the message. The receiver applies thesame polynomial (which may also be passed in the message) to the messageand compares its result with the result appended by the sender. If theyagree, the message has been received successfully. If not, the sendermay be notified to resend the message.

Gate factories may also play a role in security, since a gate factorymay be “trusted” code. Using a trusted gate factory to generate gatesmay help to ensure that gates are trusted code, and that the code iscorrect with respect to the service advertisement. Clients may berequired to present a client ID token or credential to the gate factoryas a means of authentication. Services may present a service ID token orcredential to clients (e.g. through an advertisement) when a clientwishes to create a gate.

As discussed herein, a client and service token pair may be used tocreate a third credential that may be used to allow the client to sendmessages to the service. This third credential may be referred to as anauthentication credential. An authentication credential may be createdby an authentication service during the authentication process. In oneembodiment, the service may use any authentication policy at itsdisposal. In one embodiment, the authentication service administers theauthentication policy on behalf of the service, and thus the servicedoes not have to be aware of the particular authentication policy beingused.

The client may construct its gate using an authentication credentialthat the client receives by running an authentication service specifiedin the service advertisement. This may allow the constructed gate tosend the authentication credential with each message to the service.When the service receives the first authentication credential in a firstmessage from the client, the service may use the authentication servicespecified in the service advertisement to authenticate the client, andthus may establish a binding of the authentication credential to theidentity of the client.

As previously discussed, some results produced by a service may beadvertised in a space and ultimately accessed using a results gate. Theresults gate may or may not contain the same security credential as theinput gate used to generate the results. Because input to a service maybe asynchronous from its output (the results), the results may have adifferent set of access rights associated with it. For example, apayroll service may allow a different set of clients to initiate payrollthan to read the payroll service's results (paychecks). Thus, a clientmay have to go through a separate authentication process to obtainaccess rights to the results, which may include receiving anauthentication credential for the results from an authentication servicespecified in an advertisement for the results.

Message gates may offload most security checks from services. Servicesmay focus on providing capability and authenticating clients. Aprinciple of least privilege may be supported by giving clients accessto only those capabilities that are requested (or assigned).

Security checks may occur when a gate is created and/or when a gate isused (when messages are sent and/or received). When a client requestsaccess to an advertised item (service), the process of gate creation maybegin. During this process, the client gate factory may work with theservice to mutually authenticate each other. The checks performed atgate creation time may be extensive, and may minimize the number ofchecks performed during gate usage. After the service has authenticatedthe client, the service may determine specific capabilities for theclient (e.g. what the client is allowed to do on the service), andassociate the capabilities with the client's authentication credential.These specific capabilities may specify what operations the client isallowed to perform on the service. Since the gates may ensure that everymessage contains the authentication credential, the service can thencheck each request when it is received against the capabilities of theauthenticated client.

Gate creation checks may ensure that a client has permission to use someor all of the service capabilities designated by the XML message schema.In one embodiment, these checks may be implemented using access controllists (ACLs) in conjunction with an authentication service such asKerberos. A challenge-response sequence (such as a password) may also beused to authenticate a client.

In one embodiment, whatever means is used to authenticate the client,the authentication may be invisible to both the client and service, thegate factory may be aware of which authentication service to use, andthe authentication service handles the authentication mechanism andpolicies. Gate factories may be product and environment dependent, ormay even be controlled by a configuration management system. In oneembodiment, the degree and method of client isolation may be platformdependent, but is known to the gate factory. In some embodiments, ahardware-based physical identification method may be used toauthenticate the client. For example, the user may supply a physicalidentification such as a smart card for identification andauthorization. Other mechanisms for authentication may be used in otherembodiments.

Message gates in the distributed computing environment are typicallyassociated with a single client. The means of association may bedetermined by the gate factory. The checks performed at message sendtime may ensure that the proper client is using the gate. In oneembodiment, gates may be passed in messages, and may be cloned if a newclient wishes to use the gate. The cloning process may perform a new setof creation checks.

Once a client of a space (the client may be another service) finds theadvertisement of a space service, the client of the space may run thespace service, as it would any other service. Running a space servicemay involve using an authentication mechanism. Running a space servicemay include, but is not limited to:

-   -   1. The client of the space may first run an authentication        service that may be specified in the service advertisement of        the space service to obtain an authentication credential.    -   2. The client of the space may use the authentication        credential, the XML schema of the space (from space's service        advertisement), and the URI of the space (from space's service        advertisement) to construct a gate for the space. In one        embodiment, the client may pass the information to a gate        factory to construct the gate.    -   3. The client of the space may run the space service by using        the gate to send messages to the service.    -   4. When the space service receives the first message from the        client, with the authentication credential embedded, the space        service may use the same authentication service used by the        client to obtain the authentication credential to authenticate        the client, thus establishing the client's identity.    -   5. The space service may then determine the client's        capabilities (e.g. what the client is allowed to do on the space        service) and bind the capabilities to the authentication        credential.

As discussed in the Spaces section, a space's facilities may include aninterface for spawning an empty space with substantially the samefunctionality (same XML schema) as the space from which it is spawned.The spawning facility may be useful, among other things, for dynamicallygenerating spaces for results. When a requester has spawned a space,only the requestor may be allowed to access the spawned space. Forexample, the spawned space may be for storing results from a servicethat the client needs to keep secured. This security may be ensured by:

-   -   Creating an initial root authentication credential, and        initializing the authentication service of the spawned space, so        that the authentication service only authenticates the root        authentication credential, and so that it returns no other        authentication credentials (no other clients of the spawned        space allowed initially).    -   Initializing the security policies of the spawned space so that        the root identity associated with the root authentication        credential has access to all facilities of the space, including        the security administration facilities.    -   Returning the root authentication credential and the service        advertisement of the spawned space to the requestor of the        spawned space.

The requester may build a gate to access the spawned space, since it isreturned the authentication credential and the service advertisement ofthe spawned space. In one embodiment, only the requestor and clients orservices that the requestor passes the authentication credential and thespawned space's service advertisement may access the spawned space. Suchlimiting of access to the spawned space may be useful when a client andservice are using that spawned space to store results, for example, ifthe client and service desire to keep the results private.

After running a service, the client may change the authenticationpolicies of the spawned space using a security administration spacefacility, and other clients or services may then access the spawnedspace. In addition, the spawned space's service advertisement may bemade available to other clients of the spawned space (the other clientsmay be services) using the discovery protocol or other means.

The message transport layer in a distributed computing environment mayinclude mechanisms for protecting the security and integrity ofcommunications among clients and services during transport. Thissecurity may be referred to as “wire security” or “transport security”to distinguish it from the authentication security implemented by themessaging system including gates. Encryption of messages may be providedat the message transport layer of the distributed computing environment.Services that request an encrypted transport may do so by tagging theXML advertisement. The gate factory may then create a gate (or gates)that uses a secure message transport such as those provided by Bluetoothand HTTPS.

HTTPS (Secure Hypertext Transfer Protocol) is a Web protocol thatencrypts and decrypts user page requests as well as the pages that arereturned by the Web server. HTTPS may use a multi-bit key size (may varyfrom 40 to 128-bit or more) for a stream encryption algorithm (e.g.RC4), to provide an adequate degree of encryption for commercialexchange. HTTPS may be used as a transport in the distributed computingenvironment.

Bluetooth is an emerging peer-to-peer wireless communications standard.The Bluetooth key generation algorithms may be used in the distributedcomputing environment. Bluetooth may support encryption keys. Encryptionkeys are transport dependent, while client, service, and combinationkeys may be transport independent.

FIG. 26 a—An authentication service providing an authenticationcredential to a client

FIG. 26 a is a flow diagram illustrating an authentication serviceproviding an authentication credential to a client according to oneembodiment. A client in the distributed computing environment may desirea service to perform one or more functions on behalf of the client. Inone embodiment, an authentication service may be provided for use by theclient and the service when setting up a secure messaging channel. Anauthentication service may perform functions for the client and/orservice including authenticating the client and/or service andnegotiating the desired level of security and the set of messages thatmay be passed between the client and service. The authentication servicemay be a process that is executing within the distributed computingenvironment. The authentication service may be executing on the samedevice as the service and/or the client, or alternatively theauthentication service may be executing on a separate device such as anauthentication server. In one embodiment, the authentication service maybe an Internet-based service. The authentication service may have itsown address, for example, a Universal Resource Identifier (URI), throughwhich the client and/or service may communicate with the authenticationservice. In one embodiment, the address of the authentication servicemay be provided to the client in the service advertisement for theservice. The client and service sharing an authentication service mayhelp insure that a secure messaging channel may be established betweenthe client and the service, as any of several security andauthentication protocols may be used in the messaging channel.

In one embodiment, a client may present a client identification token orcredential to an authentication service. The client token or credentialmay be sufficiently unforgeable to be used as proof of the client'sidentity. The authentication service may then check the clientidentification token or credential, and issue to the client anauthentication credential that only the authentication service cancreate. The authentication credential that is returned to the client isthen sent in every message by the client to the service. In oneembodiment, the client message gate is created by a gate factory, whichincludes the authentication credential in the message gate, and thus themessage gate includes the authentication credential in every messagethat it sends to the service on behalf of the client. When receiving amessage, the service may then check the authentication credential. Sinceonly the authentication service can create the authenticationcredential, the service knows that the client did not forge theauthentication credential. In one embodiment, the service may pass theauthentication credential to the same authentication service used by theclient to ensure the authentication credential is valid, to verify thatthe client is an authorized client, and to find out the identity of theclient.

All services, including space services and authentication services, mayauthenticate their clients. Once a service authenticates a client, theclient may access the service. For example, in the case of a spaceservice, a client may then obtain XML advertisements from the space.

In one embodiment, a service may have a prearranged credential that allclients of the service a re to use. In this embodiment, theauthentication may provide the prearranged credential to a requestingclient. Any client presenting the prearranged credential to the servicemay be approved by the service.

In step 1000, the client may request an authentication credential fromthe authentication service. In one embodiment, the client may search forand locate a service advertisement for the desired service. In oneembodiment, the service advertisement may include an advertisement forthe authentication service to be used to obtain an authenticationcredential to be used in accessing the service. In one embodiment, theservice advertisement may include an address such as a URI for theauthentication service. In one embodiment, the client may sendinformation to the authentication service requesting the authenticationcredential. In one embodiment, the client may send information to a gatecreation process, for example, a gate factory, and the gate creationprocess may access the authentication service to obtain theauthentication credential.

In step 1002, the authentication service may generate an authenticationcredential for the client. The authentication credential may be a dataelement or data structure that may be embedded in messages in amessaging system and that may allow receivers of the messages toauthenticate the sender of the message, to verify the message is from anauthorized sender, and to verify that the message is a message thesender is allowed to send to the receiver. In one embodiment of adistributed computing environment, an authentication credential may beunique to the messaging channel set up between a particular client and aparticular service. Step 1002 is further illustrated and described inFIG. 26 b. In step 1004 of FIG. 26 a, the authentication service mayreturn the authentication credential to the client. In one embodiment,the authentication credential may be returned directly to the client. Inone embodiment, the authentication credential may be returned to a gatecreation process, for example, a gate factory, which may then use theauthentication credential in generating a gate.

FIG. 26 b—An authentication service generating an authenticationcredential

FIG. 26 b is a flow diagram expanding on step 1002 of FIG. 26 a andillustrating an authentication service generating an authenticationcredential according to one embodiment. In step 1002 a, in oneembodiment, the authentication service may obtain a client token and aservice token. In another embodiment, the authentication service mayobtain only a client token. In one embodiment, the client token may be aunique identifier for the client in the distributed computingenvironment. In one embodiment, the service token may be a uniqueidentifier for the service in the distributed computing environment. Forexample, the public keys from a public/private key encryption mechanismmay be used as unique identifiers for the client and the service. In oneembodiment, the client may receive the service token in the serviceadvertisement, and the client may provide the client token and theservice token to the authentication service. In another embodiment, theclient may provide the client token and the service advertisement URI tothe authentication service, and the authentication service may retrievethe service token from the service advertisement.

In step 1002 b, the authentication service may verify the client and/orthe service. In one embodiment, the authentication service may use theclient token and the service token obtained in step 1002 a to verify theclient and/or service. In another embodiment, only a client token wasobtained in step 1002 a, and thus only the client token is used toverify the client in step 1002 b. In one embodiment, the client may havepreviously registered its client token with the authentication service,and the authentication service may compare the received client token tothe registered client token to verify the client as a valid client. Inone embodiment, the client may access the authentication service using achallenge/response mechanism such as a logon account with password andthus may be verified as a valid client. In one embodiment, the servicemay have previously registered with the authentication service, and mayhave provided its service token to the authentication service. Theauthentication service may then verify that the client is attempting toaccess a valid service by comparing the received service token to thepreviously registered service token. Other types of client and serviceauthentication may also be used. For example, the client may provide adigital signature or digital certificate that the authentication servicemay use to authenticate the client and/or to authenticate the servicethe client is trying to access.

In step 1002 c, the authentication service may generate anauthentication credential. In one embodiment, the authenticationcredential may include an authentication token that only theauthentication service can create. In one embodiment, the authenticationservice may use the client token and the service token in generating theauthentication credential. In another embodiment, the authenticationservice may use just the client token to generate the authenticationcredential. In yet another embodiment, the authentication service maynot use an obtained token in the generation of the authenticationcredential, but may instead use an authentication credential generationalgorithm to generate a substantially unforgeable authenticationcredential. In one embodiment, the authentication service may combinethe service token and client token to create a unique authenticationcredential. For example, the service token and client token may be64-bit values, and the two tokens may be combined to generate a 128-bitauthentication credential. Other embodiments may use other methods togenerate an authentication credential.

FIG. 41—Creating a gate

FIG. 41 is a flow diagram illustrating the creation of a gate for aclient according to one embodiment. In one embodiment, a gate factorymay be trusted code on the client for generating gates based on XMLservice descriptions. In another embodiment, the gate factory may resideon a separate device and may be used by the client to generate gates.For example, a gate factory service may be accessible by the client gogenerate gates. The use of the gate factory may ensure that generatedgates are trusted code, and that the code is correct with respect to theservice advertisement.

Security checks performed at gate creation time may be extensive, andthus may minimize the number of security checks that need to beperformed during gate usage. Security checks during gate creation mayhelp ensure that a client has permission to use the set of servicecapabilities designated in the message schema retrieved from the serviceadvertisement. In one embodiment, the security checks may be implementedusing Access Control Lists (ACLs) in conjunction with an authenticationservice. In one embodiment, a challenge/response sequence (such as alogon and password account) may be used to authenticate a client. In oneembodiment, the client authentication and gate creation security checksmay be hidden from the client and service, the gate factory may only beaware of the authentication service to be used, and the authenticationservice may be aware of the authentication mechanism and policies.

In step 1010, the gate factory may obtain an authentication credentialfor the client to use in communicating with a service. In oneembodiment, the client may have previously obtained the authenticationcredential from an authentication service and may then provide theauthentication credential to the gate factory. In another embodiment,the gate factory may obtain the authentication credential from theauthentication service.

In one embodiment, the gate factory may also obtain a message schema forthe service. In one embodiment, the gate factory may obtain the messageschema from the client. In another embodiment, the gate factory mayreceive the message schema from a service advertisement. For example,the client may supply a URI for the service advertisement to the gatefactory, and the gate factory may connect to the service advertisementusing the URI to obtain the message schema. The message schema maydescribe the set of messages that may be sent to or received from theservice. For example, messages may be described that may be sent from aclient to a service to invoke the service or to invoke aspects of theservice. Messages may also be described that may be sent from theservice to the client, such as response messages and event notificationmessages. In one embodiment, the messages may be XML messages, and themessage schema may be an XML message schema.

In step 1012, the gate factory may generate a client message gate. Inone embodiment, the gate factory may embed the authentication credentialas data in the generated message gate so that the message gate code mayaccess the authentication credential. In another embodiment, theauthentication credential may be stored externally to the message gateon the client. In one embodiment, a URI for the service may also beembedded in or provided to the gate by the gate factory.

In step 1012, the gate factory may also use the message schema ingenerating the client message gate. The message schema may be used todefine the set of messages that the client may send to the servicethrough the message gate. The gate factory may compile the messageschema into the gate. The message schema may be compiled by the gatefactory into the gate in an internal form suitable for quick accessduring the message verification process. Access to a service may berestricted for a particular client using the schema, thus giving theclient less than full access to the service. In one embodiment, when theclient obtains the service advertisement, for example, from a space,based upon the capabilities and/or access rights of the client, arestricted message schema may be provided to the client for the service.Thus, the gate factory may compile a restricted message schema into theclient message gate, thus restricting the client's access to theservice. In one embodiment, the authentication service may determine asubset of the total set of messages that the client may send to theservice. One or more levels of access may be provided for a service inthe distributed computing environment. One level of access may provide aclient of the service with access to all of the request messages in themessage schema for the service, and thus to substantially all of thefunctions provided by the service to clients in the distributedcomputing environment. Other levels may provide a client of the servicewith access to various subsets of the request messages in the messageschema, and thus to various subsets of the functionality of the service.In one embodiment, levels of access may also be determined by a client'scapabilities. For example a thin client may not be able to downloadlarge data files, and thus may be restricted from using a messagerequesting the download of a large data file.

In one embodiment, the client may provide information about the clientto the authentication service to determine an access level for theclient. In one embodiment, the information may include a request for aspecific level of access to the service. In one embodiment, the gatefactory may provide the information to the authentication service todetermine the access level of the client. Thus, the gate factory maygenerate a client message gate that is capable of sending a subset ofthe entire set of messages described in the message schema to theservice based upon the capabilities and/or access level of the client.

In step 1014, the gate factory has generated the client message gate,and may notify the client that the gate has been generated. In oneembodiment, the client message gate is a distinct code module that isaccessible by the client. In one embodiment, the client message gateresides on the client. The client may then generate messages and passthe messages to the client message gate, which may verify the messagesand send the messages to the service. Embodiments of a gate pairmechanism for the client and service to exchange messages is furtherdescribed in FIGS. 42 a-42 c. Embodiments of gate factories are furtherdescribed elsewhere herein.

A gate comprises code and data, and thus may itself be passed in amessage. This provides an alternative method for creating gates onclients and/or services. In one embodiment, a gate passed in a messagemay be cloned if a new client wishes to use the gate. The cloningprocess performs a new set of gate creation security checks includingauthentication of the new client. A new, unique authenticationcredential may be generated for the new client and embedded in thecloned gate.

FIG. 42 a—A client sending a message to a service

FIG. 42 a is a flow diagram illustrating a client sending a firstmessage to a service according to one embodiment. In step 1020, theclient may send a message to the client message gate. In one embodiment,the message may be an XML message. In step 1022, the message gate mayembed an authentication credential in the message prior to sending themessage. In one embodiment, the authentication credential may have beenprovided by an authentication service as part of gate construction asdescribed above.

In one embodiment, the message gate may verify the data representationlanguage type correctness, syntax, etc. of the message. In oneembodiment, the message gate may compare the message to a messagetemplate in a data representation language message schema to determinedata representation language type correctness of the message. In oneembodiment, the message may be an XML message, and the message gate maycheck the message against an XML message schema. In one embodiment, themessage schema may have been provided by an authentication service aspart of gate construction as described above. In one embodiment, themessage gate may locate a message template for the message in the schemaand compare the various items or fields in the message to the messagetemplate to determine type correctness of the items.

In one embodiment, the first message may be a request message receivedfrom the client to be sent to the service, and the message gate maydetermine if the message and/or the requested service function(s)specified by the message are in the allowed subset of messages and/orservice functions the client may send to the service. In one embodiment,the message gate may compare the message to the subset of allowedmessages in the message schema to determine if the message is allowed.In one embodiment, an access level to the service provided to the clientby the authentication service may be used to determine the subset ofallowed messages the client may send to the service. In one embodiment,the first request message may request the service to establish acommunications channel with the client. In one embodiment, thecommunications channel comprises a gate pair. The gate pair may comprisea client message gate and a service message gate. In one embodiment, theservice message gate may not exist on the service when the first messageis sent to the service.

In step 1024, the client message gate may send the first message to theservice over the communications channel connecting the client to theservice. In one embodiment, the client message gate may send the messageto a service URI. In one embodiment, the service URI may have beenprovided to the client in the service advertisement. In one embodiment,the client message gate may be created for a specific service URI sothat all messages are sent to the specific service URI, thus creating amessage channel from the client to the service. In one embodiment, therequest message may include an address for the client message gate sothat the service may establish a communications link to the clientthrough the client message gate. Examples of addresses that may be usedfor message gates include, but are not limited to: Universal UniqueIdentifiers (UUIDs) or URIs. The process of a service receiving a firstmessage from a client is illustrated and described in FIG. 42 b.

FIG. 42 b—A service receiving a message from a client

FIG. 42 b is a flow diagram illustrating a service receiving a messagefrom a client and using an authentication service to authenticate themessage according to one embodiment. In step 1030, the service mayreceive a first message from the client. In one embodiment, the servicemessage gate may not exist on the service when the first message isreceived by the service. In one embodiment, the client message gate maysend the first message to a URI at the service, and the service mayreceive the first message from the client and then may generate aservice message gate. In one embodiment, a mechanism on the service maybe configured to generally receive messages including messages fromclients at a URI provided to the client in the service advertisement.Upon receiving a first message from a client, the service may generate aservice gate to thus establish a communications channel with the clientthrough the gate pair consisting of the service message gate and theclient message gate. In one embodiment, an address (for example, a UUIDor URI) for the client message gate may be provided to the service inthe first message from the client and may be used in generating theservice message gate. In one embodiment, the service message gate maycommunicate only with the client message gate and thus with the clientassociated with the message gate. Thus, in some embodiments, there maybe at least one unique service message gate for each client that iscurrently in communication with the service.

As described above, the client message gate may have embedded anauthentication credential in the first message sent to the service. Instep 1032, the service may send the authentication credential to anauthentication service. In one embodiment, the authentication servicemay be the same authentication service used by the client to generatethe authentication credential. In one embodiment, the service messagegate may send the authentication credential to the authenticationcredential. In one embodiment, the entire message may be sent to theauthentication service.

In step 1034, the authentication service may perform verification of theauthentication credential. In one embodiment, the authentication servicemay include a copy of the authentication credential from the creation ofthe authentication credential. In one embodiment, the authenticationservice may compare the authentication credential received from theservice with the copy of the authentication credential. If theauthentication credentials match, in step 1036, the authenticationservice may notify the service that the authentication credential hasbeen verified and appears to be valid. If the verification processfails, the authentication service may notify the service that theauthentication credential appears to be invalid.

In one embodiment, the authentication service may establish an, accesslevel for the client to access the functionality of the service. In oneembodiment, the client may have established an access level for theservice with the authentication service. In one embodiment, theauthentication service may notify the service of the access level of theclient. The access level of the client may be used by the service todetermine a subset of request messages as described in the servicemessage schema that the client may send to the service.

In step 1038, if the authentication service notified the service thatthe authentication credential is valid in step 1036, the service maygenerate a service message gate to pair with the client gate to form agate pair. The service message gate may include the authenticationcredential to embed in messages sent from the service to the client, andfor comparison with the authentication credential in messages receivedfrom the client. The service message gate may also include an address(such as a UUID or URI) for the client message gate. The service messagegate may also include access level information for the client forverifying that messages received from the client are in the subset ofallowed messages the client may send to the service. The service messagegate may also include a message schema for type checking and verifyingthe syntax of messages received from the client and for use in verifyingif messages are in the allowed subset of messages. In one embodiment,the service may create a new service message gate. In anotherembodiment, a service message gate may already exist prior to step 1038that may be used to generate the service message gate to communicatewith the client. In this embodiment, the service may not create a newgate, but instead may update the existing gate with information aboutthe message channel to be established between the client a nd theservice.

In one embodiment, after the service generates the service message gate,the service may send a message to the client. The message may includeinformation to identify the service message gate to the client messagegate and thus to establish the communications channel between the clientand the service using the message gate pair. In one embodiment, themessage may include an address (such as a UUID or URI) for the servicemessage gate.

FIG. 42 c—Exchanging messages with embedded authentication credentials

FIG. 42 c is a flow diagram illustrating the general process of a clientand service exchanging messages with embedded authentication credentialaccording to one embodiment. In one embodiment, after the client messagegate and the service message gate are established, the client andservice may no longer require the services of the authenticationservice. When sending messages, the client and service message gates mayembed the authentication credential in the messages. When receivingmessages, the client and service message gates may verify the message bycomparing the embedded authentication credential with the copy of theauthentication credential included in the gate.

In step 1040, the sender (client or service) message gate may embed anauthentication credential in a message prior to sending the message. Inone embodiment, the authentication credential may have been provided byan authentication service. In one embodiment, the message may be an XMLmessage.

In one embodiment, the sender message gate may also verify the datarepresentation language type correctness, syntax, etc. of the messageprior to sending the message. In one embodiment, the sender message gatemay compare the message to a message template in a message schema todetermine type correctness of the message. For example, the message maybe an XML message, and the message gate may include an XML messageschema. The sender message gate may locate a message template for themessage in the schema and compare the various XML items or fields in themessage to the message template to determine type correctness of theitems.

In one embodiment, the sender message gate may check the allowability ofthe message. In one embodiment, the message may be a request messagereceived from a client to be sent to a service, and the message gate maydetermine if the requested function(s) specified by the message are inthe subset of functions provided to the client by the access level theclient established with the service through the authentication service.In one embodiment, the message gate may compare the message to a subsetof allowed request messages in a message schema to determine if themessage is allowed. In one embodiment, if the message is a responsemessage from a service to a client, the message may not be checked forallowability. In another embodiment, response messages from the serviceto the client may be checked by the client message gate to insure thatthe client is authorized to receive the response message.

In step 1042, the sender (client or service) message gate may then sendthe message to the destination (client or service) message gate over thecommunications channel connecting the source (client or service) to thedestination (client or service). In one embodiment, when receiving themessage, the receiver message gates may verify the sender of the messageby comparing the embedded authentication credential with the copy of theauthentication credential included in the gate.

In one embodiment, the message may be encrypted before sending. In oneembodiment, the message gate may perform the encryption. In anotherembodiment, the encryption may be performed by a process external to themessage gate. For example, the message gate may pass the completedmessage to a driver process for a communications channel, and the driverprocess may perform encryption of the message. In one embodiment,encryption and decryption of messages may be performed by a transportmechanism (e.g. HTTPS).

In step 1044, the receiver (client or service) message gate may receivethe message sent in step 1042. In one embodiment, if the message isencrypted, the message may be decrypted by a process prior to beingreceived by the message gate. In another embodiment, if the message isencrypted, the message gate may decrypt the message. In step 1046, thereceiver message gates may authenticate the sender of the message bycomparing the embedded authentication credential with the copy of theauthentication credential included in the receiver gate.

In some embodiments, some services may not require authenticationcredentials for at least some clients. In one embodiment, a clientwishing to access a service for which no authentication credential isrequired for the client may generate a message gate without using anauthentication service. In another embodiment, an authentication servicemay return a null, empty or otherwise generic authentication credentialto a client that does not require authentication to use a service. Inone embodiment not requiring authentication, the message gates may sendmessages without embedding authentication credentials. In anotherembodiment, a null, empty or otherwise generic authentication credentialmay be embedded in messages by the message gates.

In one embodiment, the receiver message gate may verify the datarepresentation language type correctness, syntax, etc. of the messageupon receiving the message. In one embodiment, the receiver message gatemay compare the message to a message template in a message schema todetermine type correctness of the message. For example, the message maybe an XML message, and the message gate may include an XML messageschema. The receiver message gate may locate a message template for themessage in the schema and compare the various XML items or fields in themessage to the message template to determine type correctness of theitems.

In one embodiment, the receiver message gate may check the allowabilityof the message. In one embodiment, the message may be a request messagereceived from a client, and the message gate may determine if therequested function(s) specified by the message are in the subset offunctions provided to the client by the access level the clientestablished with the service through the authentication service. In oneembodiment, the receiver message gate may compare the message to asubset of allowed request messages in a message schema to determine ifthe message is allowed.

In one embodiment, the message may be verified for type correctnessand/or allowability by the sender and the receiver. In a not herembodiment, the sender may perform message verification. In yet anotherembodiment, the sender may not perform message verification, and thereceiver may perform message verification. In still yet anotherembodiment, no verification may be performed.

Some clients may be too “thin” to support the full functionality of aclient message gate. These clients may not perform some or all of therequest message verification prior to send ing request messages and theresponse message verification subsequent to receiving response messagesas described above. For ex ample, some simple client devices may includea small set of request messages that may be sent to a service, and asmall set of responses that may be accepted from the service. In oneembodiment, a minimal client message gate may be constructed for theclient device that sends request messages and receives response messageswithout performing the message verification as described above. Inanother embodiment, a proxy client message gate may be set up on anotherdevice that may provide some or all of the message verification,sending, and receiving as described above for the client.

FIG. 43—Checking the integrity of messages

FIG. 43 is a flow diagram illustrating a mechanism for checking theintegrity of messages according to one embodiment. In step 1050, thesender gate, acting on behalf of a client or a service, may embed atoken in a message to be sent. This token is separate and distinct fromthe authentication credential as described above. The token may includeinformation allowing the receiving gate to verify that the message hasnot been compromised or altered. For example, the sender may compute ahash or checksum of the message that may be verified by the receiver.The sender may also encrypt this token and/or the entire message usingthe sender's private key and include in the encrypted message thecorresponding public key so that the receiver may verify that the tokenwas not changed. In step 1052, the sender gate may send the message. Instep 1054, the receiver gate, acting on behalf of a service or a client,may receive the message. In step 1056, the receiver gate may examine themessage, and the embedded token, to verify that the message has not beencompromised.

There are several methods for generating the token to embed in themessage. In one embodiment, a hash of the message may be computed andsent with the message. Hashing may include the transformation of astring of characters into a usually shorter, fixed-length value or keythat represents the original string. Upon receiving the message, thereceiver may recompute the hash and check it against the sent hash. Ifthe message has been altered, it is highly unlikely that the same hashwill be generated. The sender may encrypt the hash and send thecorresponding public key in the encrypted message to substantiallyensure that the hash is not compromised.

In other embodiments, an error detection scheme such as cyclicredundancy checking may be used. Cyclic redundancy checking is a methodof checking for errors in data that is transmitted on a communicationslink. In an embodiment using cyclic redundancy checking, the senderapplies an n-bit polynomial to the message and appends the resultingcyclic redundancy code (CRC) to the message. The receiver applies thesame polynomial (which may also be passed in the message) to the messageand compares its result with the result appended by the sender. If theyagree, the message has been received successfully. If not, the sendermay be notified to resend the message.

Other embodiments may include other methods for generating, embeddingand checking tokens for checking messages for errors or malicioustampering.

Bridging Devices to the Distributed Network Environment

There may be devices, external to the distributed computing environment,which do not support the message passing model implemented by thedistributed computing environment. These devices may provide servicesthat may be useful to clients in the distributed computing environment.The distributed computing environment may include a mechanism to bridgesuch external devices to the distributed computing environment so thatthe services offered on such devices may be accessed by clients in thedistributed computing environment. The distributed computing environmentmay also leverage existing device discovery protocols for discoveringsuch external devices for use in the distributed computing environment.

Many technologies define discovery protocols for publishing andmonitoring a network's device composition. These technologies include,but are not limited to: Jini, SLP, Bluetooth, and UPnP. Furthermore,many I/O buses such as LonWorks, USB and 1394 also support dynamicdiscovery protocols. The distributed computing environment may leveragedevice discovery technologies by wrapping their implementations in anAPI. Leveraging other device discovery protocols and providing a methodto bridge to other discovery protocols may allow the distributedcomputing environment to discover devices or services on a wide varietyof network and I/O buses. Device discovery in the distributed computingenvironment may thus be applicable to a wide range of devices includingsmall devices such as PDAs, even if they do not participate directly inthe distributed computing environment. Discovery protocols may bedefined at the message level.

A bridging mechanism may be provided for “wrapping” one or more specificdevice discovery protocols, such as Bluetooth's, in a messaging API forthe distributed computing environment. Wrapping may include framing thedevice discovery protocol with code and/or data (the API) so that theprotocol can be run by clients and/or services in the distributedcomputing environment that would not otherwise be able to run it. Whenrun, the bridging mechanism may allow for a discovery agent thatdiscovers devices by a specific device discovery protocol to publishservices for those devices in a space in the distributed computingenvironment. The services present an XML message schema interface toclients in the distributed network environment, and are capable ofoperating the various devices discovered by the specific devicediscovery protocol. Thus, service advertisements may be published forthe services that operate the various devices discovered by theunderlying wrapped device discovery protocols. The advertised servicesthus bridge devices (or services) external to the distributed networkenvironment to clients on the distributed network environment.

FIG. 27 illustrates one embodiment of a distributed computingenvironment with a space 1200. One or more discovery agents 1204 mayparticipate in an external discovery protocol and bridge to thedistributed computing environment through bridging mechanism 1202. Whenthe wrapped device discovery protocols are run, discovery agents 1204through bridging mechanism 1202 may publish service advertisements 1206a-1206 c in space 1200, wherein each one of advertisements 1206 a-1206 ccorresponds to a device or service discovered by one of discoveryprotocols 1204 outside the distributed computing environment. Clientsmay then access the external devices using the service advertisements1206 a-1206 c in space 1200 to instantiate services on one of the agents1204 that operates the corresponding external device or service.

Thus, clients of the distributed computing environment may use discoveryagents wrapping device discovery protocols to find devices. A serviceacting as a bridge to these devices may be published in a space andadvertised, so clients of the distributed computing environment mayaccess the services provided by the external devices. The advertisedservice is a service within the distributed computing environment thatis able to invoke a device outside the distributed computing environmentvia another protocol or environment, thus bridging the outsidedevice/service to the distributed computing environment. A client withinthe distributed computing environment “sees” only the advertised servicewithin the distributed computing environment and may not even be awareof the outside device/service.

In one embodiment, the distributed computing environment may provide aversion of a space discovery message protocol, such as the discoveryprotocol described in the Spaces section, that may be mapped to anunderlying external device discovery protocol, including the wrappeddevice discovery protocols described above. The mapped discoveryprotocol may register itself or be registered with a space, e.g. adefault space, by placing an advertisement in that space. For eachadvertised discovery protocol, a subsequent results space to hold theresults of the discovery protocol may be provided.

FIG. 28 illustrates an example of the space discovery protocol mapped toa Bluetooth discovery service 1220 according to one embodiment. TheBluetooth discovery service 1220 may first register 1230 with thedistributed computing environment. The Bluetooth discovery service 1220may be wrapped in a bridging API, and an advertisement 1225 for thediscovery service 1220 may be added 1232 in space 1224. A client orservice may locate the discovery service advertisement 1225 on space1224. When the discovery service 1220 is executed (utilizing the APIwrapper as a bridge between the discovery protocol 1220 and thedistributed computing environment 1222), a new space 1226 may be created1234 to store the results of the discovery process. The discoveryservice 1220 may store the results (again through the API wrapper) todiscovery results space 1226 as one or more advertisements 1227.Alternatively, results of executing discovery service 1220 may be storedto space 1224 or other preexisting spaces in the distributed computingenvironment. A similar method as illustrated in FIG. 28 may be used todiscover devices and other services using other underlying discoveryprotocols.

As mentioned above, there may be devices, external to the distributednetwork environment, which do not support the message passing modelimplemented by the distributed network environment. These devices mayhave clients that may want to use services provided in the distributedcomputing environment. The distributed computing environment may providea mechanism to bridge the external clients or client devices to thedistributed computing environment so that the clients on the externaldevices may access services in the distributed computing environment.

Agents may be provided that serve as clients in the distributedcomputing environment to bridge external clients to the distributedcomputing environment, allowing the external clients to access servicespublished in the distributed computing environment. In one embodiment,an agent may have an XML-enabled back end capable of communicating withservices in the distributed computing environment using the messagepassing model, and a proprietary protocol (e.g. a protocol supported bythe external device) on the front end to interface to the externaldevice, and thus to the external client. Thus, a client external to thedistributed computing environment may locate and access services in thedistributed computing environment through the bridging agent, and maysend requests to the services and receive responses from the services,including results data. For example, an external client may use thebridging agent to run space discovery in the distributed computingenvironment, look up advertised services, and invoke services in thedistributed computing environment.

In one embodiment, the distributed computing environment may provide abridging mechanism for accessing Jini services from a distributedcomputing environment client. Since Jini services may require RemoteMethod Invocation (RMI), and since clients in the distributed computingenvironment may communicate to services using messages such as XMLmessages, a protocol bridging mechanism may be provided to enable theaccess of a Jini Service by a distributed computing environment client.In one embodiment, a connector mechanism may be defined that enables thedynamic advertisement of Jini services in distributed computingenvironment spaces, and that also may enable the accessing of a Jiniservice proxy from clients in the distributed computing environment. Inone embodiment, there may be Jini services that may not be bridged tothe distributed computing environment.

In one embodiment, an agent may be provided as a service in thedistributed computing environment that bridges the Jini RMI protocolused by Jini services to XML messaging used by distributed computingenvironment clients. When the agent is started, the agent may perform alookup on the Jini spaces for Jini services that have a set ofattributes. For every registered Jini service, the agent may generate anXML advertisement that may correspond to the service and may registerthe advertisement in a space in the distributed computing environment.In one embodiment, an agent may register for event notification in theJini Lookup service, and thus may be informed when a new Jini service isregistered. When informed of a new Jini service, the agent may perform alookup in Jini spaces to locate newly advertised Jini services and toupdate the distributed computing environment space with new XMLadvertisements for the new services. In one embodiment, when a Jiniservice is removed, the agent may receive an event notifying of theremoval of the Jini service. The agent may then remove the XMLadvertisement for the service from the space.

In one embodiment, to invoke a Jini service via an XML advertisement ina distributed computing environment space, a client may look up theservice advertisement in the space and may send valid messages to theagent to access the service. The agent may invoke the proxy servicecorresponding to the Jini service by invoking the corresponding methodthrough an RMI call to a service proxy. If the proxy is notinstantiated, the agent may download the proxy code and instantiate anew instance of the proxy object. In one environment, every clientconnection may have a different proxy-instance. The incoming messagefrom the client may be converted by the agent into a method call for theproxy. The result from the method call may be returned to the client asan outgoing message.

In one embodiment, only simple Java types may be used as arguments to anRMI method. If complex Java types are required, then one or more dataadvertisements may be passed as arguments to the call, where the dataadvertisements may indicate the location and access method of data forthe complex Java types. In one embodiment, initial conversion from XMLmessages to an RMI method call invocation may be performed dynamicallyby the agent. Since, the agent knows the service interface, it maygenerate the corresponding set of messages that are advertised to theclient.

FIG. 29 illustrates bridging a client 1250 external to the distributedcomputing environment to a space 1254 in the distributed computingenvironment. Bridging agent 1252 may serve as the go-between betweenclient 1250 and space 1254. Bridging agent 1252 may communicate withclient 1250 in a communications protocol understandable by the client1250. Bridging agent 1252 may map the client's communications protocolinto the XML messaging protocol necessary to communicate with space 1254perform the facilities provided by space 1254. Bridging agent 1252, atclient 1250's request, may locate and run services on space 1254. Forexample, client 1250 may request a list of all services of a particulartype from space 1254. Bridging agent 1252 may locate serviceadvertisements 1256 a-c and return the results to client 1250.Alternatively, the results may be posted in a results space, and thelocation of the results may be returned to the client 1250. Client 1250may then choose to execute service advertisement 1256 a, and may send amessage (in the client 1250's communications protocol) to bridging agent1252. Bridging agent 1252 may then send the XML request message(s)necessary to execute the service represented by service advertisement1256 a, and may return the results of the service to client 1250.Methods of handling the results of the service other than directlyreturning the results to the client 1250 may be used as described abovein the section titled Spaces. Bridging agent 1252 thus may act as aservice of the external client 1250 (via the external client's protocol)and as a client within the distributed computing environment to bridge aservice within the distributed computing environment to the externalclient.

Sometimes, even within the distributed computing environment, clientsand services cannot directly communicate with each other, only to acommon space. In this case, the space service will automatically createa service proxy that bridges client to service. The proxy's main job isto route messages between client and service through the space. Theservice proxy may be created dynamically. The creation mechanism may bedependent upon space implementation. Refer to FIG. 30 for anillustration of a proxy mechanism. A client 554 and a service 556 maynot be able to communicate directly within the distributed computingenvironment, e.g., because they support different transport or networkprotocols. However, they both may be able to communicate with a space552 that supports both protocols. The space service may create a proxy550 to bridge the client 554 to the service 556. A common form of proxyis a browser proxy. A browser proxy (most commonly implemented as aservlet) may translate conventional Web page requests into messages.Refer also to the description of space search services (and proxiestherefore) in the Spaces section herein.

The distributed computing environment may provide a mechanism forbridging clients in the distributed computing environment to enterpriseservices. In one embodiment of a distributed computing environment, amethod for bridging clients to enterprise services may include a clientwithin the distributed computing environment, a bridge service withinthe distributed computing environment, and an enterprise service withinthe enterprise environment. The distributed computing environment bridgeservice serves as a bridge service between the client and the enterpriseservice.

The bridge service interacts with the client via XML message passing togather input parameters necessary to make requests to the enterpriseservice outside of the distributed network environment. For example, thebridge service may be looked up and instantiated by the client just asany other service in the distributed computing environment. The bridgeservice then may interact with the enterprise service to run theenterprise service. This interaction may use an interprocesscommunications architecture that the enterprise service can understand.As an example, if an enterprise service is implemented with EnterpriseJavaBeans (EJB), a bridge service may communicate with the enterpriseservice using EJB. The bridge service may then receive results from theenterprise service and may return the results directly to the client (inXML messages) or may place the results in a space in the distributednetwork environment (e.g. a results space). To the client, the bridgeservice appears to be the only service (the enterprise service is hiddento the client), so the client does not have to support the architectureof the enterprise service. Multiple distributed network environmentclients may use the same bridge service (each using a unique gate pair)to interact with the enterprise service.

The bridge service or other agent may publish an advertisement for thebridge service (and thus for the enterprise service) in a space in thedistributed computing environment. For example, a bridge service orother bridge agent may use Java Reflection to examine Beans for servicesin an enterprise system implemented with EJB, and then create serviceadvertisements for bridge services to the Beans and publish thoseadvertisements in spaces in the distributed computing environment.Reflection is a method for Java code to discover information about thefields, methods and constructors of classes, and to use reflectedfields, methods, and constructors to operate on their underlyingcounterparts on objects, within security restrictions. The ReflectionAPI accommodates applications that need access to either the publicmembers of a target object or the members declared by a given class.Once the bridge services are advertised, clients may access the bridgeservices (and thus the corresponding enterprise services) similarly toany other advertised services in the distributed network environment,without knowledge of the architecture of the enterprise serviceproviding the services.

Client Displays

There are several methods in which results from a service run by aclient may be displayed in a distributed computing environment. Devicesthat may display results may include, but are not limited to: CRTs oncomputers; LCDs on laptops, notebooks displays, etc; printers; speakers;and any other device capable of displaying results of the service invisual, audio, or other perceptible format. The methods for displayingresults may include, but are not limited to:

-   -   The service may return results to a client directly or by        reference, and the client may handle the display of the results.    -   The service may return results to a client directly or by        reference, and the client may pass the results to a display        service directly or by reference, and the display service may        display the results.

The service may directly handle the displaying of the results.

The service may pass the results to a display service directly or byreference, and the display service may display the results.

In the last method of displaying results, the display service may bespecified by the client. For example, there may be a display service onor associated with the device on which the client resides that theclient wishes to use to display the results of the service. When theclient runs the service, the client may send a message to the servicespecifying the service advertisement of the client's display service.The service may then build a gate that allows it to send messages to theclient's display service. Thus, when displaying results, the serviceinvoked by the client becomes a client of the client's display serviceand sends its results (directly or by reference) for display to thatdisplay service. More detail on the client-service relationship, gates,and messaging is included in other sections of this document.

FIG. 31 illustrates a client 1300 with associated display 1302 anddisplay service 1304 according to one embodiment. An advertisement 1306for display service 1304 may be registered on space 1308. Anadvertisement 1312 for service 1310 may be registered on space 1314 byservice 1310. Alternatively, service advertisement 1312 and displayservice advertisement 1306 may be registered on the same space. Client1300 may search for and discover (1320) service advertisement 1312 onspace 1314, and may then set up a gate to send requests to (and receiveresults or responses from) service 1310. In one embodiment, the messagesmay be in the form of XML messages specified in an XML schema receivedas part of advertisement 1312. Client 1300 may send one or more messages(1322) to service 1310. The one or more messages may include messagesfor running service 1310 and for instructing service 1310 to sendresults to display service 1304 for display, and may specify thelocation of display service advertisement 1306. The advertisementlocation may be specified as a Uniform Resource Identifier (URI).

The messages from client 1300 to service 1310 may instruct service 1310to perform one or more operations that produce displayable results.Service 1310 may retrieve display service advertisement 1306 from space1308 based upon the location information received from client 1300. Theservice advertisement may include the XML message schema and otherinformation necessary to interface with display service 1304. Service1310 may then set up a gate to send requests to (and receive resultsfrom) display service 1304. In other embodiments, messages from client1300 to service 1310 may include the XML schema and other informationneeded for service 1310 to construct a gate to display service 1304, ormay include a pre-constructed gate to display service 1304.

During, or after completing, operations requested by client 1300,service 1310 may send the results of the operations to display service1304 in the manner specified by the schema for display service 1304(e.g. encapsulated in XML messages specified in the XML message schemaor by reference as parameters for the display service). In this regard,service 1310 may be a client of display service 1304. Display service1304 may then format and display the results received from or indicatedby service 1310 on display 1302 for the client.

In some embodiments, service 1310 may post the results of operations toa space such as a results space (not shown). Service 1310 may then senda message to display service 1304 including a reference to the storedresults of the operations. In one embodiment, the reference may be inthe form of a URI. The display service 1304 may then retrieve theresults from the space and display the results on display 1302.

FIG. 50 is a flow diagram illustrating a client providing a displayservice for displaying data generated by a first service on behalf ofthe client according to one embodiment. The client may connect to afirst service as indicated at 2100. In connecting, the client may accessa service advertisement for the first service and use the serviceadvertisement to construct a first messaging channel to the firstservice. The first messaging channel may include a client messageendpoint (gate) on the client side and a service message endpoint on theservice side. The message endpoints may exchange messages in a datarepresentation language, e.g. XML.

The client may provide a display service advertisement to the firstservice as indicated at 2102. The display service advertisement may bean advertisement to a display service that the client wishes the firstservice to use in displaying results data generated by the first serviceon behalf of the client. In one embodiment, the client may send thedisplay service advertisement to the first service in one or moremessages on the first messaging channel. In another embodiment, thedisplay service advertisement may be stored in a space (which may be onthe client device, on the device comprising the first service, or onanother device), and the client may send a reference to the displayservice advertisement to the first service in a message on the firstmessaging channel. The service may then use the reference to locate andaccess the display service advertisement from the space. In oneembodiment, the display service and the client may be comprised on thesame device. In another embodiment, the display service may be comprisedon a separate device.

The first service may use the display service advertisement to set up asecond messaging channel between the first service and the displayservice as indicated at 2104. The second messaging channel may include amessage endpoint on the first service side and a display service messageendpoint on the display service side. The message endpoints may exchangemessages in a data representation language, e.g. XML. The first servicemay be considered a client of the display service in regards to themessaging channel between the two services.

The first service may provide data to the display service as indicatedat 2106. In one embodiment, the data may be results data generated forthe client by the first service. In one embodiment, the client may sendone or more request messages to the first service requesting the firstservice perform one or more functions for the client. Performing thefunctions may produce the results data. In one embodiment, the data maybe sent to the display service by the first service in one or moremessages on the messaging channel. In another embodiment, the firstservice may send a reference to a location of the data (e.g. anadvertisement) and the display service may access the data from thelocation using the reference. In one embodiment, the first service maystore results data on a results space in the distributed computingenvironment, and then may send an advertisement for the results data, ora reference to an advertisement, to the display service. The displayservice may then use the advertisement to access the results data fromthe results space (e.g. by setting up a third messaging channel to theresults space for receiving the results data in one or more messages).

The display service may direct the presentation of received data on apresentation device for the client as indicated at 2108. Presentationdevices that may present results for the client may include, but are notlimited to: display devices such as CRTs on computers; LCDs on laptops,notebooks displays, etc; printers; speakers; and any other devicecapable of presenting results data of the service in visual, audio, orother perceptible format. In one embodiment, the presentation device maybe integrated in or coupled to a client device comprising the client. Inanother embodiment, the presentation device may be a standalone device.In yet another embodiment, the presentation device may be integratedinto another device (for example, a second client device). In oneembodiment, the display service may format the data for display inaccordance with information included in the display service. In anotherembodiment, the first service may provide a schema including informationfor formatting the data for display. In yet another embodiment, theclient may provide a schema to the display service for formatting thedata for presentation.

Conventional application models are typically based on predetermined,largely static user interface and/or data characteristics. Changes toconventional applications may require code modification andrecompilation. The mechanisms described for advertising services and forspecifying XML message schemas for communicating with services in thedistributed computing environment may be used to provide a mechanism forapplications (clients, services, etc) to describe dynamic displayobjects. Using the dynamic display objects, application behavior may bealtered without having to download new code, recompile, or relink theapplication.

The dynamic display objects may be described in XML schemas. Theseschemas may be advertised in spaces. These schemas may be referred to asdisplay schemas or presentation schemas. An application (or otherservices acting on behalf of the application) may then access theschemas from the service advertisements to display data based uponformatting, data type, and other information stored in the schemas.

The following is an example of a schema containing dynamic displayobjects:

<element name=“delivery” type=“Space:shipto” minOccurs=“0”/> <typename=“TextField”>  <element name=“Address” type=“string”/>  <elementname=“City” type=“string”/>  <element name=“State” type=“string”/>  . ..  . . .  . . . </type>

The above schema may be changed to the following without requiring anapplication recompile:

<element name=“delivery” type=“Space:shipto” minOccurs=“0”/> <typename=“TextField”>  <element name=“Name” type=“string”/>  <elementname=“Address” type=“string”/>  <element name=“City” type=“string”/> <element name=“State” type=“string”/>  . . .  . . .  . . . </type>

FIGS. 32A and 32B illustrate examples of using schemas of dynamicdisplay objects according to one embodiment. In FIG. 32A, application1320 (may be a client, a service, or other application) has beenimplemented with presentation schema advertisement 1324 stored in space1326. A presentation schema advertisement may include elementsdescribing the data types, formatting specifications, fonts, locations,colors, and any other information used for displaying data for theapplication on display 1322. There may be multiple presentation schemaadvertisements for application 1320. For example, there may be oneschema for each display page in a series of display pages (for example,Web pages on a Web site).

In one embodiment, application 1320 may invoke a discovery and/or lookupservice to locate presentation schema advertisements. The discoveryand/or lookup service may return an XML document listing one or moreadvertisements, and URIs to each of the schemas describing a particulardisplay format, etc. Application 1320 may then select a presentationschema or schemas from the XML document. Application 1320 may then parsethe schema, breaking out the elements of the schema into user interfacecomponents. The components then may be used to locate, format, anddisplay results data on the appropriate display. The result data may befrom running a service or from a results space, for example. Thus, asopposed to having a static or predetermined display, the application1320 is configured to display results according to a presentation schemathat may be dynamically changed without requiring a rebuild of theapplication.

Presentation schemas may be provided for displaying the same results indifferent formats, for extracting portions of the results for display,and for displaying the results on different display devices.

In one embodiment, one or more presentation schema advertisements may bestored in one or more spaces in a distributed computing environment. Ascopies of an application are invoked on one or more devices, each copyof the application may run a search for services to discoveradvertisements for the presentation schemas used by the applications.Thus, a central, persistent store of the display information may be keptfor multiple instances of the application or for other applications. Thedisplay information may be modified in the central location withoutrequiring the recompilation and/or reinstallation of the applications.

In FIG. 32B, client 1328 may locate a service advertisement for service1330 on a space. When invoking service 1330, client 1328 may pass alocation of presentation schema advertisement 1324 on space 1326 toservice 1330. When service 1330 is ready to provide results to client1328, it may display the results on display 1322 (which may be coupledto the device on which client 1328 is running) using the displayinformation from the presentation schema provided by presentation schemaadvertisement 1324. To change the way the results are displayed, the XMLmessages in the presentation schema advertisement 1324 may be modified,or a different presentation schema may be selected, without requiringchanges at the client 1328 or service 1330. Service 1330 may be adisplay service.

A client, application or service may provide a plurality of presentationschemas for displaying results of various operations provided by one ormore services. Alternatively, a presentation schema may includeinformation for displaying a variety of results for one or more clients.Thus, client 1328 may use one presentation schema or a plurality ofpresentation schemas. Two or more presentation schemas may be providedfor formatting and displaying the same results with different formats,or on different displays. For example, one presentation schema for a setof results may be provided for displaying results on a display screen,and another for printing the results. Also, copies of the sameapplication, client or service may run on devices with different displaycapabilities, so two or more presentation schemas may be provided forsupporting the display requirements of the different devices.

FIG. 51 is a flow diagram illustrating a service providing apresentation schema for displaying results data according to oneembodiment. Using this method, a service may provide one or morepresentation schemas to a client with information describing thepresentation characteristics of various results data the service mayprovide to the client. A client may connect to a service in adistributed computing environment. In connecting, the client may accessa service advertisement for the service and use the serviceadvertisement to construct a messaging channel to the service. Themessaging channel may include a client message endpoint (gate) on theclient side and a service message endpoint on the service side. Themessage endpoints may exchange messages in a data representationlanguage, e.g. XML. The service may provide to the client a presentationschema for use in presenting results data produced for the client by theservice as indicated at 2120. In one embodiment, the service may providethe presentation schema in its service advertisement. In anotherembodiment, the service may provide a reference to a presentation schemaadvertisement that the client may use to access the schema. In yetanother embodiment, the service may send the presentation schema to theclient in one or more messages. The presentation schema may includeformatting, data type, and other information for use in presentingresults data produced by the service.

In one embodiment, the client may use a display service to present dataon a presentation device. In one embodiment, the client may provide theservice with information on the display service, and the service mayprovide the presentation schema to the display service. In anotherembodiment, the client may provide the service's presentation schema tothe display service (e.g. from the service advertisement).

The service may generate results data for the client as indicated at2122. In one embodiment, the client may send one or more requestmessages to the service requesting that the service perform one or morefunctions on behalf of the client, and the functions, when performed,may output results data for the client. The service may provide theresults data to the client as indicated at 2124. In one embodiment, theservice may send the results data to the client in one or more messages.In another embodiment, the service may store the results data (e.g. on aresults space) and may provide the client with an advertisement (or areference to an advertisement) to the results data. The client may thenuse the advertisement to access the results data. In one embodiment, theclient may set up a separate messaging channel to a results space wherethe results data are stored, and may access the results data in one ormore data representation language (e.g. XML) messages from the resultsspace.

The results data may be presented in accordance with the presentationschema provided by the service as indicated at 2126. The schema mayinclude presentation characteristics including formatting, data type,and other information for use in presenting results data produced by theservice. The results data may include a plurality of data elements, andthe presentation schema may include a plurality of presentation elementseach including information describing the presentation characteristicsof one or more of the plurality of data elements. The client may map thedata elements to corresponding presentation elements from the schema,and may use the information in the presentation element corresponding toeach data element to format and present the data element. In oneembodiment, a display service may perform the mapping and displaying ofdata elements on behalf of the client.

String Management

String handling in conventional systems is generally not very efficient,especially for variable sized strings, and may be wasteful of memoryspace, e.g. as the string is copied and/or moved in memory. Thisinefficiency in string handling may be particularly problematic in smallmemory footprint systems such as embedded systems. The amount of memory,particularly stack space and space for dynamic allocation, may belimited in small footprint systems. Thus, a more efficient method ofhandling strings in programs executing within small footprint systemssuch as embedded systems is desirable.

FIG. 33A illustrates a typical string representation in the Cprogramming language. FIG. 33B illustrates an example of the results ofthe strncpy( ) function on string 1452, when strncpy( ) is called withthe following parameters:

-   -   strncpy(string2, string1+3, 5);        where string2 is character pointer 1454 pointing to the first        byte after the terminating character of string 1452, string1+3        is character pointer 1450 incremented by 3 bytes, and 5 is the        number of characters (bytes) to be copied from the source        location string1+3 to string2. FIG. 33C illustrates an efficient        method for representing and managing strings in general, and in        small footprint systems such as embedded systems in particular.        String 1452 is stored in memory as 12 bytes (no terminating        character is required). String structure 1460 includes pointers        (Address(A) and Address(L)) to the first and last characters of        string 1452. Using this string structure, the string's length        may be efficiently computed by subtracting the pointer to the        first character from the pointer to the last character.

Other string functions from the standard C string library may bereplaced with string functions taking advantage of the string structureas illustrated in FIG. 33C. Examples of other C string functionsinclude, but are not limited to: strst( ), stcat( ), and sprintf( ). Thestring handling structures and methods as described in FIG. 33C may beused, along with the hierarchical structure of XML documents, to providemore efficient handling of XML text (such as XML messages) in systemswith small memory footprints such as embedded systems. The hierarchicalstructure of XML documents may allow them to be processed in a recursivefashion with successively smaller portions of the document processed ateach level of recursion.

XML Representation of Objects

As previously mentioned, Jini RMI may not be practical for some clients,such as thin clients with minimal memory footprints and minimalbandwidth. The serialization associated with the Jini RMI is slow, big,requires the JVM reflection API, and is a Java specific objectrepresentation. Java deserialization is also slow, big and requires aserialized-object parser. Even Java based thin clients may not be ableto accept huge Java objects (along with needed classes) being returned(necessarily) across the network to the client, as required in Jini.

A more scalable distributed computing mechanism may be provided byembodiments of a distributed computing environment. A distributedcomputing environment may include an API layer for facilitatingdistributed computing. The API layer provides send message and receivemessage capabilities between clients and services. This messaging APImay provide an interface for simple messages in a representation data ormeta-data format, such as in the extensible Mark-up Language (XML). Notethat while embodiments are described herein employing XML, othermeta-data type languages or formats may be used in alternateembodiments. In some embodiments, the API layer may also provide aninterface for messages to communicate between objects or to passobjects, such as Java objects. Objects accessible through API layer 102are represented by a representation data formal, such as XML. Thus, anXML representation of an object may be manipulated, as opposed to theobject itself.

The API layer may sit on top of a messaging layer. The messaging layermay be based on a representation data format, such as XML. In oneembodiment, XML messages are generated by the messaging layer accordingto calls to the API layer. The messaging layer may provide definedstatic messages that may be sent between clients and services. Messaginglayer may also provide for dynamically generated messages. In oneembodiment, an object, such as a Java object, may be dynamicallyconverted (compiled) into an XML representation. The object may includecode and/or data portions. The object's code and/or data portions may becompiled into code and data segments identified by XML tags in the XMLrepresentation. The messaging layer may then send the XML objectrepresentation as a message. Conversely, the messaging layer may receivean XML representation of an object. The object may then be reconstituted(decompiled) from that message. The reconstitution may examine the XMLrepresentation for tags identifying code and/or data segments of the XMLrepresentation, and use information stored in the tags to identify anddecompile the code and/or data portions of the object.

Creating and sending an XML representation of an Object

FIG. 34 illustrates a process of moving Java objects between a client1500 and a service 1502 according to one embodiment. Service 1502 may beany service supported in the distributed computing environment,including space services. Client 1500 employs a gate 1504, which mayhave been created using an XML schema received from a serviceadvertisement for service 1502, to communicate with a corresponding gate1506 for service 1502. At some point, client 1500 may need to send Javaobject 1510 to service 1502. Java object 1510 may reference otherobjects, which may in turn reference other objects, and so on. Javaobject 1510 and its referenced objects, the objects they in turnreference, and so on, may be referred to as an object graph.

Java object 1510 may be passed to a Java object compilation process 1512to be compiled to produce an XML representation of the object graph. TheXML representation of the object graph may be passed as an XML datastream 1514 to gate 1504. The XML data stream 1514 may include an XMLrepresentation of all the objects in the object graph. In oneembodiment, the objects in the object graph may be stored recursively inthe XML data stream 1514.

Gate 1504 may then package the XML data stream 1514 in a message 1516and send the message 1516 to gate 1506 of service 1502. Gate 1506 mayextract the XML data stream 1514 from XML message 1516 and send the XMLdata stream 1514 to an XML data stream decompilation process 1518 to bedecompiled to produce the object(s) comprising the object graph,including Java object 1510. In one embodiment, the objects in the objectgraph may be stored recursively in the XML data stream 1514, and thus arecursive decompilation process may be used.

When service 1502 needs to send a Java object to client 1500, asubstantially similar process may be used. Java object 1520 may bepassed to a Java object compilation process 1512 to be compiled toproduce an XML representation of the object graph. The XMLrepresentation of the object graph may be passed as an XML data stream1522 to gate 1506. Gate 1506 may then package the XML data stream 1522in a message 1524 and send the message 1524 to gate 1504 of client 1500.Gate 1504 may extract the XML data stream 1522 from XML message 1524 andsend the XML data stream 1522 to an data stream decompilation process1518 to be decompiled to produce the object(s) comprising the objectgraph, including Java object 1520.

In another embodiment, the gates may be responsible for the compilationand decompilation of Java objects. In this embodiment, Java object 1510may be passed to gate 1504. Gate 1504 may then pass object 1510 to aJava object compilation process 1512 to be compiled to produce an XMLrepresentation of the object graph in an XML data stream 1514. Gate 1504may then package the XML data stream 1514 in a message 1516 and send themessage 1516 to gate 1506 of service 1502. Gate 1506 may extract the XMLdata stream 1514 from XML message 1516 and send the XML data stream 1514to an XML data stream decompilation process 1518 to be decompiled toproduce the object(s) comprising the object graph, including Java object1510. The process of sending a Java object from service 1502 to client1500 may be substantially similar to the process of sending an objectfrom the client to the service.

In one embodiment, object compilation process 1512 and objectdecompilation process 1518 may both exist on the client 1500 and theservice 1502, and may be programmed to perform compilation anddecompilation substantially similarly on the two devices, thus ensuringthe object(s) output on one end are substantially identical to theobject(s) input on the other end. In one embodiment, XML schemasincluding descriptions of Java objects may be used on both the clientand/or the service in the compilation and decompilation processes. Inone embodiment, XML schema(s) to be used in the compilation anddecompilation of Java objects may be passed by the service to the clientin the service advertisement.

XML provides a language- and platform-independent object representationformat. Thus, the process as illustrated in FIG. 34 where an object iscompiled into an XML representation of the object and decompiled toreproduce the object may not be limited to moving Java objects, but insome embodiments may be applied to moving objects of other types betweenentities in a network.

FIG. 46 illustrates a mechanism for sending objects from services toclients using XML representations of the objects. In step 2200, a clientmay request an object from a service. In one embodiment, the object maybe a Java object. In one embodiment, the client may send a message (e.g.an XML message) to the service requesting the object. In step 2202, theservice, after receiving the request, may provide the object to acompilation process. In one embodiment, the compilation process may beintegrated in the virtual machine within which the service is executing.In one embodiment, the virtual machine may be a Java Virtual Machine(JVM). In one embodiment, the compilation process may be provided as anextension to the JVM. In step 2204, the compilation process generates adata representation language representation of the object. In oneembodiment, the data representation language is XML. The representationof the object may include a name or identifier for the object and one ormore instance variables for the object. An instance variable, inobject-oriented programming, is one of the variables of a class templatethat may have a different value for each object of that class. In step2206, the service may send the data representation languagerepresentation of the object to the client. In one embodiment, therepresentation may be packaged in a message. In one embodiment, themessage is in the data representation language. Message gates, asdescribed elsewhere herein, may be used for message passing between theclient and service.

In step 2208, the client receives the data representation languagerepresentation of the object and provides the representation to adecompilation process. In one embodiment, the decompilation process maybe integrated in the virtual machine within which the client isexecuting. In one embodiment, the virtual machine may be a Java VirtualMachine (JVM). In one embodiment, the decompilation process may beprovided as an extension to the JVM. In step 2210, the decompilation maygenerate a copy of the object from the data representation languagerepresentation of the object. The object may then be provided to theclient.

JVM compilation/decompilation API

FIGS. 35 a and 35 b are data flow diagrams illustrating embodimentswhere a virtual machine (e.g. JVM) includes extensions for compilingobjects (e.g. Java Objects) into XML representations of the objects, andfor decompiling XML representations of (Java) objects into (Java)objects. The JVM may supply an Applications Programming Interface (API)to the compilation/decompilation extensions. The client 1500 and service1502 may be executing within JVMs. The JVMs may be on the same device oron different devices.

In both FIG. 35 a and FIG. 35 b, the JVM XML compiler/decompiler API1530 may accept a Java object 1510 as input, and output an XMLrepresentation of the object 1510 and all its referenced objects (theobject graph of object 1510) in an XML data stream 1514. In addition,the JVM XML compiler/decompiler API 1530 may accept an XML data stream1522, which includes an XML representation of object 1520 and all itsreferenced objects (the object graph of object 1520), and output Javaobject 1520 (and all the objects in its object graph).

FIG. 35 a illustrates one embodiment where, when sending Java object1510, the JVM XML compiler/decompiler API 1530 is called by the client.The client 1510 passes Java object 1510 to the API 1530, which compilesthe object to produce its XML representation, stores the XMLrepresentation in XML data stream 1514, and outputs XML data stream1514. XML data stream 1514 may then be passed to gate 1504 by theclient. Gate 1504 may then package the XML data stream 1514 in an XMLmessage 1516 and send message 1516 to service 1502.

Upon receiving XML message 1524 from service 1502, gate 1522 may extractXML data stream 1522 from message 1524 and pass data stream 1522 toclient 1500. Client 1500 may then call the JVM XML compiler/decompilerAPI 1530, passing API 1530 the XML data stream 1522. The API 1530 maythen decompile the XML data stream 1522 to produce Java object 1520 andother objects in its object graph, returning the objects to client 1500.

FIG. 35 b illustrates another embodiment where, when sending Java object1510, the JVM XML compiler/decompiler API 1530 is called by the gate.The client 1510 passes Java object 1510 to gate 1504. Gate 1504 thenpasses object 1510 to API 1530, which compiles the object to produce itsXML representation, stores the XML representation in XML data stream1514, and outputs XML data stream 1514. Gate 1504 may then package theXML data stream 1514 in an XML message 1516 and send message 1516 toservice 1502.

Upon receiving XML message 1524 from service 1502, gate 1522 may extractXML data stream 1522 from message 1524 and pass data stream 1522 to theJVM XML compiler/decompiler API 1530. The API 1530 may then decompilethe XML data stream 1522 to produce Java object 1520 and other objectsin its object graph. The gate may then send Java object 1520 and theother objects to client 1500.

In one embodiment, the JVM XML compiler and decompiler may beimplemented as integrated functions of the JVM. In another embodiment,the XML compiler and decompiler may be embodied in API methodinvocations in standard extensions to the JVM; thus, the core JVM doesnot have to be modified. The JVM may supply the JVM XMLcompiler/decompiler API 1530 to processes (clients and/or services)executing within the JVM to allow the processes to access the Javaobject compilation/decompilation functionality provided by the JVM. Inone embodiment, for a process to utilize the objectcompilation/decompilation, the JVM within which the process is executingmust have the JVM XML compiler/decompiler functionality and API 1530.

Methods using reflection and serialization to transform and send objectsare typically implemented in applications separate from the JVM. Theapplication must repeatedly access the JVM to pick apart an object onefield at a time as the transitive closure of the object is dynamicallyanalyzed. This tends to be a slow and cumbersome process, while alsorequiring large amounts of application and JVM code.

Implementing the Java object compilation/decompilation functionalitywithin the JVM is advantageous because the JVM already understands theconcept of, and contents of, an object graph. Thus, thecompilation/decompilation functions may leverage the knowledge (andreuse code) of the JVM in parsing the object graph to produce the XMLrepresentation, and in parsing the XML representation to produce theobject graph. Thus, the compilation/decompilation functions may not haveto duplicate functionality that is provided by the JVM, as do objectsending methods using reflection and serialization. This may allow thecode footprint of the compilation/decompilation functions to be smallerthan that of object sending methods using reflection and serialization.Also, an object may be complied or decompiled by a single call to theJVM XML compiler/decompiler API.

In addition, integrating the compilation/decompilation of objects withthe JVM may allow the compilation and decompilation of objects to beperformed faster than methods using reflection and serializationbecause, in the object traversal model implemented with reflection andserialization, the code outside the JVM does not know the structure orgraph of the Java object, and thus must traverse the object graph,pulling it apart, and ultimately must repeatedly call upon the JVM to dothe compilation (and the reverse process for decompilation). Thisprocess may be slowed by the necessity of making repeated calls to theJVM, outside the code. Having the compilation and decompilationfunctionality integrated with the JVM, as described herein, avoidshaving to make repeated calls from code outside the JVM to the JVM. Inone embodiment, an object may be complied or decompiled by a single callto the JVM XML compiler/decompiler API.

In one embodiment, the compilation/decompilation functionality may beimplemented as a service in the distributed computing environment. Theservice may publish a service advertisement in a space. A process in thedistributed computing environment may use a search or discovery serviceto locate the compilation/decompilation service. The process (a clientof the service) may then use the service by passing Java objects to becompiled into XML representations and/or XML representations to bedecompiled into Java objects to the service.

Java objects may include code (the object's methods) and data. Anobject's code may be non-transient; the code does not change once theobject is created. An object's data, however, may be transient. Twoobjects created from the same Java class may include identical code, butthe data in the two objects may be different. In one embodiment, thecompilation function may compile a Java Qbject's data into an XMLrepresentation of the object, but may not include the object's actualcode in the XML representation. In one embodiment, information about theobject may be included in the compiled XML representation to indicate tothe receiver bow to recreate the code for the object. The XMLrepresentation may then be stored in an XML data stream and sent (e.g.in a message) to a receiving process (client or service). The receivingprocess may then pass the XML data stream to the decompilation function.The decompilation function may then decompile the XML data stream toproduce the Java object including its data. In one embodiment, the codefor the object may be reproduced by the decompilation function usinginformation about the object included in the XML representation, as thecode for an object may be statically defined and the JVM receiving theobject may be able to reproduce the code (if necessary) using itsknowledge of the object.

In one embodiment, the XML representation of an object produced by thecompilation function may include the Java object's data and informationabout the Java object. The information may include class information forthe Java object. An object signature may be included in the informationand may be used to identify the object's class, etc. The decompilationfunction may recreate the code for the Java object using the informationabout the Java object and may decompile the data from the XML datastream into the Java object. Thus, a complete object including its codeand data may be reproduced on the JVM executing the receiving client orservice from the decompiled data and the information describing theobject. In one embodiment, the information describing the object may bestored in one or more XML tags. In one embodiment, the client or servicereceiving the XML data stream may include an XML schema that describesthe object, and the XML schema may be used to reconstruct the Javaobject from the decompiled data and from the information about the Javaobject. The decompilation process may proceed recursively through theobject graph, reconstructing the objects referenced by the object bydecompiling the referenced objects' data from the XML data stream andrecreating the referenced objects' code from information about thereferenced objects in the XML data stream.

In one embodiment, the XML representation of the object produced by thecompilation function may include the object's data and information thatidentifies the code of an object. In one embodiment, the informationidentifying the code of the object may be stored in one or more XML tagsin the XML data stream. When received, the decompilation function mayrecreate the code for the Java object using the information about thecode from the XML data stream and decompile the data for the object fromthe XML data stream. Thus, a complete object including its code and datamay be reproduced on the JVM executing the receiving client or servicefrom the decompiled data and the information describing the code of theobject.

Several scenarios of using XML representations of objects to transferobjects between entities (typically clients and services) in adistributed computing environment are included for clarification. Thesescenarios are exemplary and are not intended to be limiting.

In a first scenario, a service may use the XML compiler/decompiler tocompile a Java object into an XML representation of the object and sendthe XML representation to a client. The client may the use the XMLcompiler/decompiler to decompile the XML representation and performoperations on the data within the object, and later may use the XMLcompiler/decompiler to compile the object into an XML representation ofthe object and return the XML representation of the object to theservice.

In a second scenario, a service may use the XML compiler/decompiler tocompile a Java object into an XML representation of the object and sendthe XML representation to a client. The client may then send the XMLrepresentation to another service, which may use the XMLcompiler/decompiler to decompile the XML representation to reproduce theobject, perform operations on the object at the request of the client(possibly modifying the data), use the XML compiler/decompiler torecompile the modified object into its XML representation, and send theXML representation of the object to the client.

In a third scenario, a service may use the XML compiler/decompiler tocompile a Java object into an XML representation of the object and sendthe XML representation to an object repository or store space. Theservice may then send a message to a client informing the client of thelocation of the XML representation. The message may include a UniversalResource Identifier (URI) for the XML representation. The client maythen retrieve the XML representation of the object from the store space,and may use the XML compiler/decompiler to decompile the representationto reproduce the object. Alternatively, the client may send the locationof the XML representation of the object to another service, along with arequest for operations to be performed on the object. The other servicemay then retrieve the XML representation from the store space, use theXML compiler/decompiler to decompile the XML representation to reproducethe object, and perform the requested operations on the object.

In a fourth scenario, a process (could be a client or service) maylocate an object repository or store space in the distributed computingenvironment by searching for and finding a service advertisement for thestore space. The process may, during execution, create or obtain aplurality of Java objects. The process may use the XMLcompiler/decompiler to compile one or more of the objects into XMLrepresentations of the objects, and may send, as a client of the storespace service, the XML representations of the objects to the store spaceto be stored for possible later access, or for access by otherprocesses.

Security issues in the Decompilation of XML Representations of Objects

Spaces, as described herein, may serve as a file system in thedistributed computing environment. Security may be provided for files inthe system in the form of access rights. Access rights may be checkedeach time a file is accessed (opened, read, or written to). Thus, amethod for providing file access security in the distributed computingenvironment may be desirable. This method may also be applied to the XMLrepresentations of Java objects that may be stored in spaces andtransmitted between clients and services in the distributed computingenvironment.

In one embodiment, a user of a client on a device in the distributedcomputing environment may be identified and authenticated when firstaccessing the client. In one embodiment, the user may supply a physicalidentification such as a smart card for identification andauthorization. In another embodiment, a challenge-response mechanism(such as user ID and password) may be used for identification andauthorization. Yet another embodiment may use electronic identificationsuch as a digital signature for identification and authorization. Anyother method of identification and authorization may be used.

Once identified and authorized, the user may then perform variousoperations on the client, including accessing one or more services inthe distributed computing environment. During these operations, asdescribed above, one or more objects may be created (locally) oracquired from elsewhere (e.g. from services or spaces). The objects maybe modified and may be compiled into XML representations of the objectsand stored locally by the client or sent to a space service for(transitive or persistent) store. Some of the objects may be receivedfrom services (store services or other services) in the form of XMLrepresentations of the objects, which may be decompiled by the XMLcompiler/decompiler to recreate the objects on the client.

In one embodiment, during the decompilation of the XML representation ofobjects, each XML message may be checked to verify that the user hasaccess rights to the object. If the user does not have the proper accessrights, the XML compiler/decompiler may not decompile the object for theuser. In one embodiment, a security exception may be thrown by the XMLcompiler/decompiler. In one embodiment, the user may be informed of theaccess violation.

Access right information, such as the creator and access levels allowed(creator-only access, read only, read/write, delete, copy, etc.) for theobject may be embedded in the XML message(s) containing the XMLrepresentation of the object. Access authorization may be determinedduring the identification and authorization of the user. For example,the object may allow “read only” access for most users, and “read/write”access for the creator of the object. If the user tries to access anobject using read/write access rights, and the object was not created bythe user, the decompilation process may detect this as an accessviolation, and may disallow the access and notify the user.

In one embodiment, when the user is done using the client, the user maylog off or otherwise signal the user is finished with the client (e.g.remove a smart card). Objects created on the client by decompilation maybe automatically deleted when the client detects that the user isfinished. This may prohibit future users from intentionally oraccidentally accessing the user's objects. In one embodiment, allobjects created by decompilation may be deleted upon detecting that theuser is finished. In another embodiment, a method may be provided tostore at least some of the objects created on the client persistently(e.g. with access rights information), so that the client may lateraccess the objects, or provide the objects to other users for access.

In one embodiment, the user may have a “smart card” or other physicaldevice to gain access to the client. The user may insert the smart cardinto the client device to begin the session. When the client isfinished, the client may remove the smart card. The client may detectthe removal of the smart card, and thus detect that the client isfinished, and may then proceed to delete objects created bydecompilation of XML representations.

FIG. 47 illustrates a mechanism for secure object decompilation on aclient device. In step 2240, a user may access a client device. In oneembodiment, the user may provide identification to the client. In oneembodiment, the user may log on to the client, for example, with a username and password. In one embodiment, the user may provide a physicalidentification method, e.g. a smart card, to the client device toestablish the user's identity with the device.

After the user has been authenticated, the client may request one ormore objects from one or more services during access by the user. In oneembodiment, the objects may be Java objects. In one embodiment, theclient may send messages (e.g. an XML messages) to the servicesrequesting the objects. The services, after receiving the requests, maysend the data representation language representations of the objects tothe client. In one embodiment, the representations may be packaged inmessages. Message gates, as described elsewhere herein, may be used formessage passing between the client and service.

In step 2242, the client receives the data representation languagerepresentations of the objects and provides the representations to adecompilation process. In one embodiment, the decompilation process maybe integrated in the virtual machine within which the client isexecuting. In one embodiment, the virtual machine may be a Java VirtualMachine (JVM). The decompilation may generate copies of the objects fromthe data representation language representations of the objects. In oneembodiment, the messages may be checked to make sure the client hasaccess privileges to the requested objects. The objects may then beprovided to the client to be available for use during access by theuser.

In step 2244, the user may end access to the client device. For example,the user may log off or, if one was used, may remove an identificationdevice such as a smart card to signal to the client device that the useris ending access of the client. Upon detecting that the client has endedthe access, the client device may automatically delete any objects thathave been decompiled for the user during the access by the user.Deleting the objects may insure that the objects are not left on theclient device to be accidentally or intentionally accessed by subsequentusers of the device.

Alternatively, one or more of the objects may not be deleted when theuser terminates access. Instead, the objects may be stored (eitherlocally or elsewhere in the distributed computing environment) for lateraccess by the user. In one embodiment, access information of the clientmay be stored with the objects to prevent unauthorized users fromaccessing the objects.

XML-based object repositories

In the distributed computing environment, processes (services and/orclients) may desire transient and/or persistent storage of objects suchas XML schemas, service advertisements, results generated by services,XML representations of Java objects and/or objects implemented in otherlanguages, etc. Existing object storage technologies tend to be languageand/or operating system specific. These storage systems also tend to betoo complicated to be used with small footprint systems such as embeddedsystems.

JavaSpaces in Jini is an existing object repository mechanism. AJavaSpace may be only capable of storing Java objects and may be toolarge to be implemented in small devices with limited amounts of memory.Each object in a JavaSpace may be serialized as previously described,and thus has the same limitations as previously described for thereflection and serialization techniques.

A store mechanism may be provided for the distributed computingenvironment that may be heterogeneous (not language or operating systemdependent), that may scale from small to large devices, and that mayprovide transient or persistent storage of objects. In one embodiment,the store mechanism in the distributed computing environment may beimplemented as an Internet Web page or set of pages defined in the XMLmarkup language. XML provides a language- and platform-independentobject representation format enabling Java and non-Java software tostore and retrieve language-independent objects. Since the storemechanism is on the Web, devices of all types and sizes (small to large)may access the store mechanisms. Web browsers may be used to view thestore mechanism implemented as Web pages. Web search engines may be usedto search for contents in the store mechanism implemented as Web pages.Internet administration mechanisms (existing and future) and XML toolsmay be used to administer the XML-based store mechanisms.

In one embodiment, the store mechanisms may be used to store objectscreated, represented or encapsulated in XML. Examples of objects thatmay be stored in the store mechanisms may include, but are not limitedto: XML schemas, XML representations of objects (for example, Javaobjects compiled into XML representations as described above), serviceadvertisements, and service results (data) encapsulated in XML. In oneembodiment, to prevent unauthorized access of an XML object, anauthorization credential such as a digital signature or certificate maybe included with the XML object, and a client wishing to access the XMLobject may be required to have the proper authorization credential toaccess the XML object. In one embodiment, the store mechanism may be aspace as described in the Spaces section herein.

Store mechanisms may be services in the distributed computingenvironment. A store mechanism implemented as a service may be referredto as a “store service”. A store service may publish an advertisement ina space. The space itself is an example of a store service. Some storeservices may be transient. For example, a space service that storesservice advertisements may be a transient store. Other store servicesmay be persistent. For example, a store service that stores results fromservices may be a persistent store.

FIG. 36 illustrates a client 1604 and a service A 1606 accessing storemechanisms 1600 and 1602 in the distributed computing environmentaccording to one embodiment. This illustration is intended to beexemplary and is not intended to be limiting to the scope of thisinvention. In one embodiment, store mechanisms 1600 and 1602 may each bean Internet Web page or set of Web pages defined in XML and accessibleby a Web browser and other Internet tools. Store mechanism 1600 is atransient store capable of storing objects implemented using XML. Storemechanism 1602 is a persistent store also capable of storing objectsimplemented using XML. Service A 1606 may publish an XML serviceadvertisement 1608 in transient store 1600. Persistent store may alsopublish an XML service advertisement in transient store 1600 (or onanother transient store in the distributed computing environment). Atsome point, client 1604 may require functionality provided by Service A1606. Client 1604 may use a discovery and/or lookup service to locateservice advertisement 1608. Client 1604 may then construct a messagegate, as described herein, and begin communications with Service A 1606.Client 1604 may send one or more XML request messages to Service A 1606.Service A 1606 may perform one or more functions in response to the oneor more request messages. One or more of the functions performed byService A 1606 may produce results to be provided to client 1604.

For transient results 1610, Service A 1606 may encapsulate the resultsin an XML advertisement 1612 and publish the advertisement 1612 intransient store 1600 (or on another transient store in the distributedcomputing environment). Service A 1606 may then notify client 1604 thatthe results 1610 are stored in advertisement 1612 on transient store1600, or client 1604 may be notified by other mechanisms as describedherein. Client 1604 may then retrieve transient results 1610 fromadvertisement 1612. The advertisement 1612 may include an XML schemadescribing the formatting, contents, type, etc. of the transient results1610. The results may be encapsulated in XML. For example, XML tags maybe used to describe portions of the data:

<XML tag1> <data1> <XML tag2> <data2> . . .

For persistent results 1618, Service A 1606 may use a service or othermechanism as described herein to locate XML service advertisement 1616for persistent store 1602, and thus locate persistent store 1602 forstoring persistent results. Alternatively, client 1604 may havepreviously located persistent store 1602 by locating its serviceadvertisement 1616, and then may send a Universal Resource Identifier(URI) for a storage location for persistent results 1618 to Service A inan XML message. In one embodiment, persistent results 1618 may be storedin an Internet Web page or set of Web pages defined in XML andaccessible by a Web browser. Service A 1606 may then store persistentresults 1618 in persistent store 1602. Service A 1606 may then publishan XML advertisement 1616 for the persistent results 1618 in transientstore 1600 (or on another transient store in the distributed computingenvironment) and return the location of the advertisement 1616 to client1604. The advertisement 1616 may include an XML schema describing theformatting, contents, type, etc. of the persistent results 1618. Theresults may be encapsulated in XML as previously described. Theadvertisement may also include the URI of the persistent results 1618.The client 1604 may then retrieve the advertisement 1616 and use it tolocate and retrieve persistent results 1618. Alternatively, Service A1606 may not publish an advertisement for persistent results 1618, butinstead may return a URI for the persistent results 1618 to client 1604so client 1604 may access the results without looking up anadvertisement. Note in some embodiments, the various advertisementsshown in transient store 1600 may each be stored in different transientstores or spaces.

Thus, store mechanisms may be implemented as XML-based Internet Webpages in the distributed computing environment. These store mechanismsmay be implemented on a variety of devices in the environment, and mayprovide service advertisements to allow clients (which may be otherservices) to locate and use the store mechanisms. Existing and futureWeb and XML tools may be used to manage the store mechanisms. The storemechanisms may store objects of various types implemented orencapsulated in XML. Clients on devices of substantially any size, fromsmall footprint devices to supercomputers, may access the storemechanisms to store and retrieve the various objects on the Internet.The clients may be Java or non-Java applications, as XML provides alanguage-independent storage format. The transient or persistent objectrepositories may provide for a file system in the distributed computingenvironment and may include access checks and other security mechanismas described herein.

Dynamically Converting a Java Object into an XML Document

In one embodiment, the distributed computing environment may provide amechanism to convert and represent an object class instance into an XMLdocument. In order to send representation of a class instance to anotherservice, the object may be converted and represented as an XML document.In one embodiment, when receiving an XML document, a program mayinstantiate a class instance corresponding to the object represented bythe document. In one embodiment, the objects may be Java objects, andthe program may be a Java program.

In one embodiment, an intermediary format may be used to represent anXML document and may be dynamically processed to generate a classinstance that represents the XML document. The class may define a set ofinstance variables and “set and get” methods to access the instancevariables. A corresponding XML document may be defined as a set of tags,with one tag for each instance variable. When the document is parsed, ahashable representation may be constructed where the hash key mayinclude the instance variable name and the value may include theinstance variable value. If there are multiple occurrences of a complexinstance variable, an enumeration value may be stored in a hash table.In one embodiment, the process may be limited to only one level ofcomplex types for the instance variables, and the elements may behomogeneous.

In one embodiment, a protected instance variable may be added to theclass definition that may include the name of the corresponding class.The XML document representation may use the class name as the documenttype. Having the class name embedded in the document may allow dynamicinstantiation of the right class instance when the object isreconstructed.

In one embodiment, upon receiving a document, a class instance generatormethod may be used to extract the class type and to parse the documentto generate the intermediary hash table representation. The generatormethod may instantiate a new class instance and may use the set methodsto initialize the instance object from the hash table values. In oneembodiment, since the class type is defined and the hash table isgeneric, this process may be performed for any class that matches theabove class definition.

In one embodiment, the reverse process may also be performed where aclass instance may be processed into the intermediary hash tablerepresentation and a generator method may be used to produce an XMLdocument from the hash table representation. This process may also bemade generic so that it may be performed for any XML document thatmatches the above specification.

This method is not intended to be limited to Java Class objects, and maybe applied to other computer-based objects, including class objectinstances of other programming languages. In addition, the method is notintended to be limited to XML representations of object instances; otherrepresentation formats including other data representation languages(such as HTML) may be substituted for XML.

XML-Based Process Migration

The distributed computing environment may enable the distribution andmanagement of distributed applications. For example, the distributedcomputing environment may include mobile clients that are dockable withstations that provide monitors, printers, keyboards, and various otherinput/output devices that are typically not provided on mobile devicessuch as PDAs, cell phones, etc. These mobile clients may run one or moreapplications, and may migrate from one station to another in thedistributed computing environment. Thus, one embodiment of thedistributed computing environment may provide a method for migrating anexecuting application (process) with its entire current state from amobile client on one node to the same mob ile client or another mobileclient at another node within the distributed computing environment.

In one embodiment, an XML representation of the state of a processexecuting on a client or service may be created. In one embodiment, theXML representation of the state of the process may include a computationstate of the device and/or virtual machine on which the process isexecuting, wherein the computation state of the device and/or virtualmachine comprises information about the execution state of the processon the device and/or virtual machine. A process state may include, butis not limited to: threads, all objects referenced by the threads,transient variables created during the execution of the process, objectsand their data, etc. In one embodiment, data describing one or moreleases representing grants of access to external services, obtained fromspaces by the process, wherein the one or more external services areexternal to the device and/or virtual machine on which the process isexecuting, may also be represented in XML and stored with the processstate. Leases are described in more detail in the Leases section of thisdocument.

Using XML and the messaging system as described here in, anrepresentation of the state of a process may be moved from node to nodewithin the distributed computing environment, e.g. from node to node onthe Internet. The XML representation of the state of a process may alsobe stored as an object in an XML-based store mechanism as describedabove, and later retrieved from the store mechanism to resume theprocess execution on the same node or on a different node in thedistributed computing environment. In one embodiment, the XML objectcompilation/decompilation process as described herein may be used increating (compiling) an XML representation of the state of a process andin regenerating the state of the process by decompiling the XMLrepresentation of the state of the process.

Using this mechanism, an XML representation of the state of a processmay be stored in an XML-based store mechanism, such as a space, from aninitial node. Subsequently, another node may locate the stored state ofthe process, download the state of the process, and resume the processfrom the downloaded stored state at the point at which it was executingwhen the state was stored. Since the process state is stored in an XMLformat, the tools and search facilities described herein to store,locate and retrieve XML objects in XML-based store mechanisms may beused to enable the migration of the process. An advertisement of thestored XML representation of the state of the process may be publishedto allow a client resuming the process execution on the same node oranother node to locate and access the stored sate.

The XML representation of the state of a process may be stored to anXML-based persistent store mechanism, and thus may provide a persistentsnapshot of the process. This may be used as a method to resume processexecution on a node after the interruption of the process on the node,for example, due to the intentional or unintentional shutdown of thenode. An advertisement of the stored state of the process may bepublished to allow clients to locate the stored state in the distributedcomputing environment. In one embodiment, to prevent unauthorized accessof an XML representation of the stored state of a process, anauthorization credential such as a digital signature or certificate maybe included with the stored state, and a client wishing to resume aprocess from the stored state may be required to have the properauthorization credential to access the stored state.

FIG. 37 illustrates process migration using an XML representation of thestate of a process according to one embodiment. Process A 1636 a may beexecuting on node 1630. Process A 1636 a may be a client or service. Atsome point during the execution of Process A 1636 a, the state ofexecution of Process A 1636 a may be captured and stored in an XMLencapsulated state of Process A 1638. The execution of Process A 1636 aon node 1630 may then be stopped. Later, node 1632 may locate theXML-encapsulated state of Process A 1638 and use it to resume Process A1636 b on the node 1632. Resuming Process A may include using the storedstate 1638 to resume thread execution, recalculate transient variables,re-establish leased resources, and perform any other functions necessaryto resume execution as recorded in the stored XML state of the process1638.

The following is an example of using XML-based process migration in thedistributed computing environment, and is not intended to be limiting. Amobile client device may be connected to node 1630 and executing ProcessA 1636 a. The user of the mobile client device may desire to stopexecution of Process A 1636 a on node 1630, and to resume execution at alater time at another (or the same) node. In one embodiment, the usermay be prompted with a query to determine if the user wishes to storethe state of Process A 1636 a and resume execution later. If the userreplies in the affirmative, the embodiment, the user may then executeprocess 1636 b and select a “Resume from Stored State” option. The node1632 may then search for and locate the XML-encapsulated state ofProcess A 1638, download it, and use it to resume Process A 1636 b.Alternatively, the process may itself know that it was “suspended” onanother node, and may resume from the stored state without user input.

FIG. 48 illustrates a mechanism for migrating processes using datarepresentation language (such as XML) representations of the processesin a distributed computing environment. In step 2260, a process isexecuting within a first device. In step 2262, a current computationstate of the process is converted into a data representation languagerepresentation of the current computation state, wherein the computationstate of the process comprises information about the execution state ofthe process within the first device. This information may include, butis not limited to, information about one or more threads of the process,information about one or more leases to services held by the process,and information about one or more objects of the process (such asobjects held by the threads), wherein an object is an instance of aclass in a computer programming language (such as the lava programminglanguage).

In step 2264, the data representation language representation of thecurrent computation state of the process may be stored. In oneembodiment, the representation may be stored locally. In one embodiment,the data representation language representation of the currentcomputation state of the process may be stored to a space using a spaceservice. In one embodiment, the data representation languagerepresentation of the current computation state of the process may besent to the space service in one or more messages.

In step 2266, a second device may access the stored data representationlanguage representation of the current computation state of the process.In one embodiment, an advertisement may be provided for the stored datarepresentation language representation, and the second device mayreceive or access the advertisement and use information in theadvertisement to locate and access the stored data representationlanguage representation. In step 2268, the process may be reconstitutedat the current computation state within the second device from theaccessed data representation language representation of the currentcomputation state of the process. The process may then resume executionwithin the second device from the current computation state.

Alternatively, the process execution may be ended on the first devicesubsequent to step 2264. The first device may then subsequently accessthe stored data representation language representation of the currentcomputation state of the process. The process may then be reconstitutedat the current computation state within the first device from the datarepresentation language representation of the current computation stateof the process and execution of the process may be resumed within thefirst device from the current computation state.

In another alternative, the data representation language representationof the current computation state of the process generated at step 2262may be sent directly to the second device (e.g. in one or more datarepresentation language messages through message gates). The process maythen be reconstituted at the current computation state within the seconddevice from the received data representation language representation ofthe current computation state of the process. The process may thenresume execution within the second device from the current computationstate.

Applications

Technologies exist that allow a user to access network data from remotelocations, making the remote data appear as local data to the user,provided the user has access to a browser. However, such technologies donot provide an automatic infrastructure to query networks near a clientdevice's location. A mechanism for discovering information aboutnetworks and services near a client device may be desirable. Forexample, such a mechanism may be used to locate information aboutrestaurants, weather, maps, traffic, movie information, etc within acertain distance (radius) of the client device, and to display desiredinformation on the client device. An example of using this mechanism maybe a cell phone that can be used to automatically locate services in alocal environment, for example, in a movie theater to display the titlesand show times of current features in the movie theater or in arestaurant to view menu selections and prices. In the distributedcomputing environment as described herein, such a mechanism may be usedto discover spaces including local information and/or services proximateto the client device. The mechanism may also be applied in otherdistributed computing environments, for example, the Jini system fromSun Microsystems, Inc.

In one embodiment, a mobile client device may include Global PositioningSystem (GPS) capability and wireless connection technology. Localdistributed computing networks may be provided. For example, a city mayprovide a citywide distributed computing environment. Another examplemay be a shopping mall with a local distributed computing environment. Alocal distributed computing network may include a discovery mechanism toallow client devices to connect to the distributed computing environmentand to discover services and data in the local environment. For example,one or more devices in the environment may include wireless connectiontechnology to allow mobile client devices to connect to the network andto access the discovery mechanism via the XML messaging system asdescribed previously. A local distributed computing environment mayinclude one or more spaces with advertisements for services and/or datato be made available to mobile clients. For example, a citywidedistributed computing environment may include spaces that represententities such as malls, movie theaters, local news, local weather,traffic, etc. A space may include individual service and/or dataadvertisements for accessing services of and information about theentity the space represents. The discovery mechanism may include a GPSlocation or locations of the local distributed computing environment,entities represented by space services within the environment, and/orthe various services advertised in the spaces in the environment.

In one embodiment, wired connections may be provided to a localdistributed computing network. In this environment, a user with a mobileclient device may “plug in” directly to the network using a wiredconnection “docking station”. Examples of wired connections include, butare not limited to: Universal Serial Bus (USB), FireWire, andtwisted-pair Internet. In one embodiment, a docking station may alsoprovide input/output capabilities such as a keyboard, mouse, and displayfor the mobile client device. In this embodiment, the location of themobile client device may be provided to the lookup or discoverymechanism by the docking station.

In one embodiment, a mobile client device may connect to a distributedcomputing network. As the user of the mobile client device navigateswithin wireless communications range of the distributed computingnetwork, the mobile client device may constantly, or at variousintervals, provide a location vector as input to the local lookup ordiscovery mechanism. The mobile client device may obtain the locationvector from a GPS system built into or associated with the mobileclient. In one embodiment, the client may send its location information(e.g. via XML messaging) to a local service discovery mechanism, such asone of the space location mechanisms described herein. For example, theclient may run the space discovery protocol specifying discovery forspaces offering services within a certain range of the clients location,or the client may instantiate a space search service to search forspaces advertising services provided for the client's vicinity.

As the mobile client device moves into a specified range of a spacewithin the distributed computing environment, the services and/or datastored in the space may be made available to the mobile client device.In embodiments where the client device regularly provides its locationto a discovery mechanism, local services and/or data may automaticallybe made available to the client's user. In one embodiment, the specifiedrange of a space may be determined by the user of the mobile clientdevice. For example, the user may choose to display all restaurantswithin one mile of a current location. Alternatively, the range may bespecified in the configuration of the local distributed computingnetwork. For example, a citywide distributed computing network may beconfigured to provide its services to all users within three miles ofthe city limits. In one embodiment, visual indicators, for exampleicons, representing the various services and/or data offered by thespace may be displayed on the mobile client device. The client may thenaccess one or more of the displayed services and/or data. In oneembodiment, information from two or more spaces may be displayedsimultaneously on the mobile client device. In one embodiment, the usermay select what services and/or data are to be detected. For example, ina shopping mall, a user with a mobile client device may choose todisplay all shoe stores in the mall.

In one embodiment, executable code and/or data used in the execution ofthe code may be downloaded to the mobile client device to allow the userto execute an application provided by a service in the space. Forexample, moviegoers with mobile client devices may download interactivemovie reviews from services in a space for the movie theater, and maythus perform real-time feedback about the movie they are watching. Inone embodiment, an XML object compilation/decompilation mechanism asdescribed elsewhere herein may be used to compile the code and/or datato produce XML representations of the code and/or data, and to decompilethe XML representations to reproduce the code and/or data on the mobileclient device. In one embodiment, an executable version of a process maypreviously exist on the mobile client device, and a stored state of theprocess may be downloaded to the mobile client device to allow the userto execute the process using the stored state. In one embodiment, anexecutable version of a process may previously exist on the mobileclient device, and data for the process may be downloaded to the mobileclient device. For example, data may be downloaded for viewing with aviewer program on the mobile client device. In one embodiment, anexecutable version of a process, including the code and data forexecuting the process, may be downloaded for execution on the mobileclient device. In one embodiment, the service may execute theapplication remotely on behalf of the mobile client device, and theservice and client may pass to each other XML messages including dataand optionally XML schemas describing the data. In one embodiment, somecode may be executed on the service and some on the client. For example,the service may execute code to perform operations on a set of data suchas numerical calculations. The mobile client device may execute codethat may display portions of the data passed to the client from theservice in XML messages and allow the user of the mobile client deviceto enter and/or select data and send the data to the service forperforming one or more operations on the data.

In one embodiment, a mobile client device may be connected to two ormore services in the distributed computing network simultaneously. Theservices may be used independently or in conjunction for performing aseries of tasks. For example, one service may be used by a remote clientdevice to locate and/or perform operations on a set of data, and asecond service may be used to print the set of data.

FIG. 38 illustrates a mobile client device accessing spaces in a localdistributed computing network, according to one embodiment. A user ofGPS-enabled mobile computing device 1700 may move into proximity of alocal distributed computing environment. The mobile client device 1700may provide its location provided by GPS 1702 to one or more discoverymechanisms 1706 in the local distributed computing network. Thediscovery mechanism 1706 may use the provided GPS location of the mobileclient device and predetermined locations of spaces within theenvironment to determine when the user moves within a specified range ofone or more spaces or a vicinity served by one or more spaces within theenvironment. For example, discovery mechanism 1706 may determine thatmobile client device 1700 has moved within range of space 1704.Discovery mechanism 1706 may then provide one or more advertisements1710 from space 1704 to the mobile client device 1700. Alternatively,discovery mechanism 1706 may provide a Universal Resource Identifier(URI) for space 1704, or for one or more advertisements in space 1704,to mobile client device 1700. Icons representing the various servicesadvertised by service advertisements 1708 and/or data represented bycontent advertisements 1710 may then be displayed on mobile clientdevice 1700. The user may then select one or more of the advertisedservices and/or data for execution and/or display on the mobile clientdevice. The mobile computing device 1700 may establish a wirelessconnection with the device offering the service and communicate with thedevice to execute the service using the XML-based messaging system aspreviously described herein. Alternatively, the user of the mobilecomputing device 1700 may connect the device at a docking station. Thelocation of the docking station may have been discovered by the userusing the lookup or discovery mechanism 1706, and spaces containingadvertisements for the docking stations to discover the location andavailability of docking stations within a specified range of the user.

Discovery mechanism 1706 may also detect when mobile client device 1700moves into a selected range of space 1714. The various serviceadvertisements 1718 and content advertisements 1720 may then be madeavailable to the user of the mobile client device 1700. When the mobileclient device moves out of the specified range of one of the spaces, theadvertisements offered by that space may be removed from the mobileclient device 1700's display.

In one embodiment, advertisements on a space may include locationinformation for the services or data that they provide. Thus, discoverymechanism 1706 may determine when mobile client device 1700 moves withina specified range of a particular service advertised on space 1718, andmay provide (or remove) the service advertisement based upon thelocation of the mobile client device 1700.

Computing devices are shrinking while at the same time gaining power andfunctionality. Storage devices, CPUs, RAM, I/O ASICS, power supplies,etc. have been reduced in size to where small, mobile client devices mayinclude much of the functionality of a full-sized personal computer.However, some components of a computer system are not easily shrinkablebecause of the human factor and other factors. These components include,but are not limited to: keyboards, monitors, scanners, and printers. Thelimits on reducing the size of some components may prevent mobile clientdevices from truly assuming the role of personal computers.

In one embodiment, docking stations may be provided that allow userswith mobile client devices to connect to and use components that are notavailable on the mobile client device because of human or other factors.For example, docking stations may be provided in public places such asairports or libraries. The docking stations may provide monitors,keyboards, printers or other devices for users with mobile clientdevices. In one embodiment, the docking stations may not fully functionwithout help from a real computing device such as a mobile client deviceconnected by a user. The docking station may provide services such asvarious input/output functions to the client using the computing powerof the mobile client device.

A docking station may provide one or more connection options to a mobileclient device. The connection options may include wireless connectionsand wired connections. Examples of wireless connections include, but arenot limited to: infrared such as IrDA and wireless network connectionssimilar to those provided by a network interface card (NIC) in anotebook computer. Examples of wired connections include, but are notlimited to: USB, FireWire, and twisted-pair Ethernet.

A mobile client device may discover the location of docking stationsusing a method substantially similar to that described above for mobileclient devices. The location of one or more docking stations in a localdistributed computing network may be discovered using a discoverymechanism to discover spaces with advertisements for docking stations.The mobile client device may provide a location to the discoverymechanism. In one embodiment, the discovery mechanism or a lookupmechanism may return the location of one or more docking stationsclosest to the location of the mobile client device. Alternatively, thediscovery mechanism or lookup mechanism may return a URI of the spacecontaining the advertisements for the docking stations, and the mobileclient device may then connect with the space to provide the location ofthe one or more docking stations near the device. In one embodiment, themobile client device may supply information to the lookup or discoverymechanism to specify requirements such as monitor resolution, screensize, graphics capabilities, available devices such as printers andscanners, etc. In one embodiment, information about the one or moredocking stations may be supplied to the user on the mobile client deviceincluding availability (is another user using the docking station),components and capabilities of the various docking stations.

When a user approaches a docking station, a claiming protocol may beinitiated. When th claim is accepted by the docking station, secureinput and output connections may be established between the mobileclient device and the docking station. Alternatively, the user mayselect the docking station from one or more docking stations discoveredusing the lookup or discovery mechanism displayed on the mobile clientdevice. When the user selects the docking station, the claim ingprotocol may be initiated to give the user se cure, exclusive connectionto the docking station for the duration of the claim. A docking stationrelease method may also be provided to allow the user to terminate thesession on the docking station and release the docking station for useby other users. In one embodiment, the claiming protocol may be a leaseon the docking station service as described previously herein.

FIG. 39 a illustrates a user of a mobile device discovering the locationof docking stations according to one embodiment. Mobile client device1750 may connect with discovery mechanism 1756. Mobile client device1750 may provide a location obtained using GPS 1752 to discoverymechanism 1756. Mobile client device 1750 may also provide dockingstation requirements to discovery mechanism 1756. Discovery mechanism1756 may search one or more spaces 1754 for advertisements for dockingstations 1758 that meet the requirements of mobile client device 1750.In one embodiment, a lookup or discovery mechanism may locate one ormore docking stations within a specified range of mobile device 1750 bycomparing location information stored in advertisements 1758 with thesupplied location of mobile device 1750. Discovery mechanism 1756 maythen provide the location of one or more docking stations within aspecified range of mobile client device 1750. Alternatively, discoverymechanism 1756 may locate a nearest docking station to mobile clientdevice 1750 and provide the location to mobile client device 1750.

FIG. 39 b illustrates a mobile client device 1750 connecting to adocking station 1760, according to one embodiment. In one embodiment,the user may move mobile client device 1750 into wireless range ofdocking station 1760 and make a wireless connection to the dockingstation 1760. In another embodiment, the user may establish a wiredconnection to docking station 1760 by connecting one or more cablesbetween docking station 1760 and mobile client device 1750. In oneembodiment, a claim may be established to the docking station 1760 bythe user of the mobile client device 1750. The claim may establishsecure, exclusive rights to the docking station for the duration of theconnection. In one embodiment, the claim mechanism may be a leasemechanism for a resource (the docking station) as described previouslyherein. In one embodiment, a user may be billed for use of the dockingstation. For example, the user may supply a credit card number as partof the process of claiming a docking station. Refer to the descriptionof bill gates in the Message Gates section herein. Once connected, theuser may use the various facilities provided by the docking station 1760such as keyboard, monitor, printer, etc. Docking station 1760 may alsoinclude a connection to a local distributed computing network and thusmay provide the user of the mobile client device 1750 connected to thedocking station 1760 with discovery services for locating service andcontent advertisements on other devices within the network, allowing theuser to locate and use various services and content in the distributedcomputing environment as described previously herein.

When finished, the user may disconnect the mobile client device 1750from the docking station 1760. In one embodiment, a docking stationrelease mechanism may automatically be initiated when the mobile clientdevice 1750 is disconnected from the docking station 1750. The releasemechanism may clear any claim on the docking station 1760 established bythe user of the mobile client device 1750. In one embodiment, therelease mechanism may notify the discovery mechanism 1756 and/or dockingstation advertisement 1758 that the docking station is available.

In one embodiment, a user may connect a mobile client device to adocking station without using the discovery mechanism. For example, auser in an airport may visually detect a docking station and connect amobile client device to it. Another example may be a library providing adocking station room with a plurality of docking stations for use, whereusers may access any of the docking stations that are available.

Small Footprint and/or Embedded Devices

Simple embedded or small footprint devices may have limited amounts ofmemory for storing and executing program instructions. A simple embeddeddevice may need to understand a limited set of control inputs forinitiating functionality of the device and outputs for reporting thestatus of the device. An example of a simple embedded device is a“smart” switch (such as a light switch) with embedded circuitry forcontrolling the switch and thus the device controlled by the switch. Thesmart switch may only need to understand two control requests (changethe state of the device, request the state if the device) and to sendone status message (the state of the device). The smart switch maymanage the device to which it is connected by receiving its controlrequests from one or more control systems and reporting status messagesto the one or more control systems.

In one embodiment, the distributed computing environment may provide aframework (protocol) for including small devices that may not have theresource footprint (such as memory) necessary to implement the fullprotocol of the distributed computing environment. In one embodiment, anagent may be provided as a bridge between the small device-capableprotocol and the full protocol. The agent may perform the full protocoldiscovery for the small device, so the device may not be required toimplement the full discovery protocol and service activation. In oneembodiment, the small device may only need to send service-specificmessages. In one embodiment, these messages may be pre-cooked on thesmall device, so the small device may only have to send mess ages thatare part of the service activation to the agent. The agent may performthe service activation via the full protocol to the service and forwardincoming message from the device to the service, and/or may forwardreplies from the service to the client. Thus, the agent may act as aservice connector for the small client.

In one embodiment of the distributed computing environment, an embeddeddevice may be configured to receive a specific set of control requestsin the form of XML messages and to send a specific set of XML messagesto make requests, report status, etc. In one embodiment, a controlsystem may be configured to manage a variety of devices by sending XMLrequest messages specific to each device or category of device that itcontrols and by receiving XML messages from the devices. In oneembodiment, one or more XML schemas may be used to define an embeddeddevice's specific set of XML messages; the schema may be used by theembedded device and/or the control system in sending and receiving XMLmessages.

An embedded device may include a “thin” implementation of the XMLmessaging system as previously described herein that supports thespecific set of messages for controlling and monitoring the simpleembedded device. The implementation of the XML messaging system may betailored for use with small footprint, simple embedded devices, and thusmay fit in the limited memory of the small footprint devices. In oneembodiment, the XML messaging system may be implemented in a smallfootprint with a virtual machine targeted at small footprint embeddeddevices (e.g. KVM). A networking stack (to support the transportprotocol for communications with one or more control systems) may beassociated with the virtual machine and the XML messaging layer may “siton top” of the networking stack. It is noted that this implementation ofthe messaging system may be used in other devices than small footprintor embedded devices.

In one embodiment, static or pre-generated messages may be used forrequests from control systems to embedded devices. The static messagesmay be precompiled and stored in the embedded devices. An incomingmessage may be compared with the stored static messages to find a matchfor the message and thus to perform the function requested by themessage, thus reducing or eliminating the need for code to parseincoming messages. Outgoing messages may be read directly from thestored static messages, thus reducing or eliminating the need todynamically compile outgoing messages. Thus, static messages may be usedto reduce the code footprint of the messaging layer in embedded systems.For example, static Java objects (Java op codes) may be used for requestand status messages.

FIG. 40 a illustrates an embodiment of embedded devices 1804 a and 1804b controlled by a control system 1800, according to one embodiment.Control system 1800 may be networked with the devices 1804 a and 1804 bit controls in any of a variety of ways. The network 1810 may be wired(Ethernet, coaxial, twisted pair, power grid, etc.) and/or wireless(IrDA, microwave, etc.). In one embodiment, embedded devices 1804 a and1804 b may include a thin implementation of the XML messaging system forcommunicating with control system 1800 over network 1810. Control system1800 may have an implementation of the XML messaging system for sendingrequests to and receiving responses from embedded devices 1804 a and1804 b. In one embodiment, control system 1800 may include software andhardware configured to present an interface to allow a user to displaythe status of and remotely control the embedded devices 1804 a and 1804b. In one embodiment, control system 1800 may include software and/orhardware for automatic control of embedded devices 1804 a and 1804 b.

In one embodiment, embedded devices 1804 a and 1804 b may be part ofanother environment. The devices may not support the message passingmodel implemented by the distributed network environment. For example,the devices may be nodes in a networked automation and control systemsuch as a LonWorks network. Control system 1800 may include a controlsystem hardware and/or software for controlling devices in the otherenvironment. Control system 1800 may serve as a bridge between thedistributed computing environment and the other environment. Thedistributed computing environment may also provide a method or methodsto wrap existing device discovery protocols for discovering the devicesfor access from the distributed network environment. Bridging andwrapping protocols are further described herein in the Bridging section.

Control system 1800 may be connected remotely or locally to one or moreother systems in the distributed computing environment. FIG. 40 a showscontrol system 1800 connected to client 1806 via the Internet 1802.Client 1806 may indirectly request the status of, and send controlrequests to, embedded devices 1804 a and 1804 b through control system1800. Thus, control system 1800 may serve as a proxy or bridge forembedded devices 1804 a and 1804 b. See the Bridging section herein. Toenable sophisticated communication between the client 1806 and thecontrol system 1800, the client and the control system may havedifferent implementations of the XML messaging system than the thinimplementation on the embedded devices 1804 a and 1804 b. In oneembodiment, client 1806 may include software and hardware configured topresent an interface to allow a user of client 1806 to display thestatus of and remotely control the embedded devices 1804 a and 1804 b.In one embodiment, client 1806 must present the correct authorizationcredentials to control system 1800 to enable the client 1806 to accessembedded devices 1804 a and 1804 b. In one embodiment, client 1806 maybe granted access at different levels. For example, client 1806 may onlybe able to view the status of embedded devices 1804 a and 1804 b but notbe allowed to remotely control the devices. In one embodiment, controlsystem 1800 may be a service, may have a service advertisement publishedin the distributed computing environment, and thus may be accessed byclient 1806 using the client-service method as described previously inthis document. In one embodiment, client 1806 may be able to view thestatus of, and to remotely control, control system 1800.

FIG. 40 b illustrates client control system 1808 connected via theInternet 1802 to embedded devices 1804 c and 1804 d, according to oneembodiment. In one embodiment, embedded devices 1804 c and 1804 d mayinclude a thin implementation of the XML messaging system forcommunicating with client control system 1808 over the Internet 1802.Client control system 1808 may have an implementation of the XMLmessaging system for sending requests to and receiving responses fromembedded devices 1804 c and 1804 d. In one embodiment, client controlsystem 1808 may include software and hardware configured to present aninterface to allow a user to display the status of and remotely controlthe embedded devices 1804 c and 1804 d. In one embodiment, clientcontrol system 1800 may include software and/or hardware for automaticcontrol of embedded devices 1804 c and 1804 d.

A difference between FIG. 40 a and FIG. 40 b is that, in the embodimentillustrated in FIG. 40 b, the embedded devices 1804 c and 1804 d may beaccessed by one or more clients in the distributed computing environmentwithout requiring a proxy (e.g. control system). Embedded devices 1804 cand 1804 d may include services for accessing the functionality of thedevices, may have published service advertisements in the distributedcomputing environment, and thus may be accessed via the client-servicemethod as described previously in this document.

The distributed computing environment may include a mechanism for aresource-limited client to retrieve Universal Resource Identifier (URI)addressed resources. For example, a client that is only capable ofsending and receiving messages via an IrDA connection may not be able toestablish a URI connection to retrieve results from a results space. Inone embodiment, a service may be provided as a bridge between the clientand the URI resource. The bridge service may interact with the clientvia XML messages to gather input parameters. The following is includedas an example of an XML input message syntax and is not intended to belimiting in any way:

<type name=“HttpGet”>   <element name=“urlstring” type=“string”/></type>

Then, outside the distributed computing environment, the bridge servicemay establish a URI connection and retrieve the resource. The resourcemay then be encapsulated as a payload in one or more XML messages andsent to the client by the bridge service.

The following illustration of one possible use of embedded devices withthin implementations of the XML messaging system is included forexemplary purposes and is not intended to be limiting. A building mayinclude a plurality of electronic devices that consume energy (e.g.lights, air conditioners, office equipment), and thus may require asystem for maintaining an optimum energy consumption level. Theplurality of devices may each include an embedded device for controllingthe electronic devices. The embedded devices may include the thinimplementation of the XML messaging system. One or more control systemsmay be coupled to the devices in a network, for example, a building LANor even the Internet. A control system may store and execute a buildingmanagement software package and an implementation of the XML messagingsystem configured to be used by the software package for monitoring andcontrolling the devices. The control system may accept input from users,and may display and otherwise output status information for the buildingenergy consumption system, including status information for each of theplurality of devices. Energy consumption may be monitored by receivingXML status messages from each of the plurality of devices. When energyconsumption levels need to be adjusted, XML control messages may be sentto one or more of the devices to cause the energy consumption to change.

Implementing Services

In one embodiment, the distributed computing environment may provide amechanism for implementing services as servlets. The mechanism mayprovide functionality for developing services for the distributedcomputing environment.

In one embodiment, an Application Programming Interface (API) may beprovided that provides the functionality to allow the service to beinitialized and registered in a space. In one embodiment, the API may beused to invoke the initialization of the service and to generate aninitialization status page, for example, an HTML page, that may definethe status of the service. A user may access the status of the serviceby accessing the status page from a browser. In one embodiment, the APImay be used to process incoming messages and to generate documents inresponse to the messages.

An embodiment of the servlet mechanism may provide several functionsincluding, but not limited to:

-   -   Management of the client connection to the service (unique        session ID)    -   Management of an activation space that may be used to store        results advertisements    -   Management of leases on connections sessions and results in        activation spaces    -   Garbage collection of sessions and results    -   Authentication of clients    -   Generation of client capabilities on a per session basis.        In one embodiment, the distributed computing environment may        provide a service cascading mechanism by which new, complex        services may be constructed from other existing services. For        example, from a JPG-to-PostScript transformation service and a        print service, a third cascaded service may be created by        combining the transformation and print service. In one        embodiment, two or more services may be combined into a complex        service by defining access methods of the two or more services        as the access methods of the cascaded service.

Conclusion

Various embodiments may further include receiving, sending or storinginstructions and/or data implemented in accordance with the foregoingdescription upon a carrier medium. Generally speaking, a carrier mediummay include storage media or memory media such as magnetic or opticalmedia, e.g., disk or CD-ROM, volatile or non-volatile media such as RAM(e.g. SDRAM, RDRAM, SRAM, etc.), ROM, etc. as well as transmission mediaor signals such as electrical, electromagnetic, or digital signals,conveyed via a communication medium such as network and/or a wirelesslink.

Various modifications and changes may be made as would be obvious to aperson skilled in the art having the benefit of this disclosure. It isintended that the invention embraces all such modifications and changesand, accordingly, the specifications, appendices and drawings are to beregarded in an illustrative rather than a restrictive sense.

1. A method for displaying results data in a distributed computingenvironment, comprising: establishing a first messaging channel betweena client and a first service in the distributed computing environment;the client sending a first message to the first service on the firstmessaging channel, wherein the first message specifies a display serviceadvertisement for enabling access to a display service associated withthe client, wherein the display service advertisement comprises a datarepresentation language message schema comprising descriptions of one ormore data representation language messages for sending data to thedisplay service; the first service accessing the display serviceadvertisement as specified in the first message; the first serviceestablishing a second messaging channel between the first service andthe display service in accordance with the display serviceadvertisement; and the first service generating one or more datarepresentation language messages in accordance with the descriptions ofthe one or more data representation language messages from the datarepresentation language schema, wherein the one or more datarepresentation language messages include data for the client.
 2. Themethod as recited in claim 1, wherein the first messaging channel isconfigured to pass messages in a data representation language betweenthe client and the first service, and wherein the second messagingchannel is configured to pass messages in the data representationlanguage between the first service and the display service.
 3. Themethod as recited in claim 2, wherein the data representation languageis extensible Markup Language (XML).
 4. The method as recited in claim1, further comprising: the first service sending the one or more datarepresentation language messages to the display service on the secondmessaging channel; and the display service displaying the data from theone or more data representation language messages on a display of theclient.
 5. The method as recited in claim 1, wherein the first serviceestablishing a second messaging channel comprises the first servicegenerating a first service message endpoint, wherein the first servicemessage endpoint is configured to send messages to and receive messagesfrom a display service message endpoint of the display service.
 6. Themethod as recited in claim 1, further comprising: the display servicereceiving the one or more data representation language messages from thefirst service; and the display service displaying the data included inthe one or more representation language data messages on a display ofthe client.
 7. The method as recited in claim 1, wherein the displayservice advertisement further comprises: an address for the displayservice to receive messages in the distributed computing environment;wherein the method further comprises the first service sending the oneor more data representation language messages to the address for thedisplay service to receive messages.
 8. The method as recited in claim7, wherein the address is a Uniform Resource Identifier (URI).
 9. Themethod as recited in claim 1, further comprising: the client sending asecond message to the first service on the first messaging channel,wherein the second message requests the first service to perform afunction on behalf of the client; and the first service performing thefunction as requested by the client, wherein said performing thefunction produces results data.
 10. The method as recited in claim 9,further comprising: the first service sending one or more results datamessages to the display service on the second messaging channel, whereinthe one or more results data messages include the results data producedby said performing the function; and the display service displaying theresults data from the one or more results data messages on a display ofthe client.
 11. The method as recited in claim 9, further comprising thefirst service storing the results data on a results space in thedistributed computing environment.
 12. The method as recited in claim 9,further comprising: the first service sending a results message to thedisplay service on the second messaging channel, wherein the resultsmessage specifies a results advertisement for accessing the results datastored on the results space; the display service accessing the resultsdata from the results space in accordance with the resultsadvertisement; and the display service displaying the results data on adisplay of the client.
 13. The method as recited in claim 1, wherein thedisplay service advertisement is on a storage device in the distributedcomputing environment, wherein the first message includes informationfor accessing the display service advertisement on the storage devicethrough a space service.
 14. The method as recited in claim 13, whereinthe first service accessing the display service advertisement comprisesaccessing the display service advertisement from the storage devicethrough the space service.
 15. The method as recited in claim 1, whereinthe display service advertisement is an extensible Markup Language (XML)document.
 16. The method as recited in claim 1, wherein the client isexecuting within a first device in the distributed computingenvironment, and wherein the display service is executing within asecond device in the distributed computing environment.
 17. Adistributed computing system, comprising: a first device configured toprovide a first service accessible within the distributed computingsystem; and a second device configured to: provide a display serviceaccessible within the distributed computing system; and provide a clientprocess accessible within the distributed computing system; wherein theclient process is configured to: establish a first messaging channelbetween the client process and the first service in the distributedcomputing environment; and send a first message to the first service onthe first messaging channel, wherein the first message specifies adisplay service advertisement for enabling access to the displayservice, wherein the display service advertisement comprises a datarepresentation language message schema comprising descriptions of one ormore data representation language messages for sending data to thedisplay service; wherein the first service is configured to: access thedisplay service advertisement as specified in the first message;establish a second messaging channel between the first service and thedisplay service in accordance with the display service advertisement;and generate one or more data representation language messages inaccordance with descriptions of the one or more data representationlanguage messages from the data representation language message schema,wherein the one or more data representation language messages includedata for the client process.
 18. The system as recited in claim 17,wherein the first messaging channel is configured to pass messages in adata representation language between the client process and the firstservice, and wherein the second messaging channel is configured to passmessages in the data representation language between the first serviceand the display service.
 19. The system as recited in claim 18, whereinthe data representation language is extensible Markup Language (XML).20. The system as recited in claim 17, wherein the second devicecomprises a display; wherein the first service is further configured tosend the one or more data representation language messages to thedisplay service on the second messaging channel; and wherein the displayservice is further configured to display the data for the client processfrom the one or more data representation language messages on thedisplay of the second device.
 21. The system as recited in claim 17,wherein, in said establishing a second messaging channel, the firstservice is further configured to generate a first service messageendpoint, wherein the first service message endpoint is configured tosend messages to and receive messages from the display service.
 22. Thesystem as recited in claim 17, wherein the second device comprises adisplay; wherein the display service is further configured to: receivethe one or more data representation language messages; and display thedata included in the one or more data representation language messageson the display of the second device.
 23. The system as recited in claim17, wherein the display service advertisement further comprises: anaddress for the display service to receive messages in the distributedcomputing environment; wherein the first service is further configuredto send the one or more data message to the address for the displayservice to receive messages.
 24. The system as recited in claim 17,wherein the address is a Uniform Resource Identifier (URI).
 25. Thesystem as recited in claim 17, wherein the client process is furtherconfigured to send a second message to the first service on the firstmessaging channel, wherein the second message requests the first serviceto perform a function on behalf of the client process; and wherein thefirst service is further configured to perform the function as requestedby the client process, wherein said performing the function producesresults data.
 26. The system as recited in claim 25, wherein the seconddevice comprises a display; wherein the first service is furtherconfigured to send one or more results data messages to the displayservice on the second messaging channel, wherein the one or more resultsdata messages include the results data produced by said performing thefunction; and wherein the display service is further configured todisplay the results data from the one or more results data messages onthe display of the second device.
 27. The system as recited in claim 25,further comprising: a third device configured to provide a results spaceservice accessible within the distributed computing system; wherein thesecond device comprises a display; wherein the first service is furtherconfigured to: store the results data on the third device through theresults space service; send a results message to the display service onthe second messaging channel, wherein the results message specifies aresults advertisement for accessing the results data stored on the thirddevice; wherein the display service is further configured to: access theresults data from the third device through the results space service inaccordance with the results advertisement; and display the results dataon the display of the second device.
 28. The system as recited in claim17, further comprising: a fourth device configured to provide a spaceservice accessible within the distributed computing system, wherein thedisplay service advertisement is stored on the fourth device; whereinthe first message includes information for accessing the display serviceadvertisement on the fourth device through the space service; andwherein, in accessing the display service advertisement, the firstservice is further configured to access the display serviceadvertisement from the fourth device through the space service.
 29. Adistributed computing system, comprising: a first device configured toprovide a first service accessible within the distributed computingsystem; a second device configured to provide a display serviceaccessible within the distributed computing system; and a client device,configured to: establish a first messaging channel between the clientdevice and the first service in the distributed computing environment;and send a first message to the first service on the first messagingchannel, wherein the first message specifies a display serviceadvertisement for enabling access to the display service, wherein thedisplay service advertisement comprises a data representation languagemessage schema comprising descriptions of one or more datarepresentation language messages for sending data to the displayservice; wherein the first service is configured to: access the displayservice advertisement as specified in the first message; and establish asecond messaging channel between the first service and the displayservice in accordance with the display service advertisement; andgenerate one or more data representation language messages in accordancewith descriptions of the one or more data representation languagemessages from the data representation language message schema, whereinthe one or more data representation language messages include data forthe client device.
 30. The system as recited in claim 29, wherein thesecond device comprises a display; wherein the first service is furtherconfigured to send the one or more data representation language messagesto the display service on the second messaging channel; and wherein thedisplay service is further configured to display the data for the clientdevice from the one or more data representation language messages on thedisplay of the second device.
 31. The system as recited in claim 29,wherein the second device comprises a display; wherein the displayservice is further configured to: receive the one or more datarepresentation language messages; and display the data included in theone or more data representation language messages on the display of thesecond device.
 32. The system as recited in claim 29, wherein thedisplay service advertisement further comprises: an address for thedisplay service to receive messages in the distributed computingenvironment; wherein the first service is further configured to send theone or more data message to the address for the display service toreceive messages.
 33. The system as recited in claim 32, wherein theaddress is a Uniform Resource Identifier (URI).
 34. The system asrecited in claim 29, wherein the client device is further configured tosend a second message to the first service on the first messagingchannel, wherein the second message requests the first service toperform a function on behalf of the client device; and wherein the firstservice is further configured to perform the function as requested bythe client device, wherein said performing the function produces resultsdata.
 35. The system as recited in claim 34, wherein the second devicecomprises a display; wherein the first service is further configured tosend one or more results data messages to the display service on thesecond messaging channel, wherein the one or more results data messagesinclude the results data produced by said performing the function; andwherein the display service is further configured to display the resultsdata from the one or more results data messages on the display of thesecond device.
 36. The system as recited in claim 34, furthercomprising: a third device configured to provide a results space serviceaccessible within the distributed computing system; wherein the seconddevice comprises a display; wherein the first service is furtherconfigured to: store the results data on the third device through theresults space service; send a results message to the display service onthe second messaging channel, wherein the results message specifies aresults advertisement for accessing the results data stored on the thirddevice; wherein the display service is further configured to: access theresults data from the third device through the results space service inaccordance with the results advertisement; and display the results dataon the display of the second device.
 37. The system as recited in claim29, further comprising: a fourth device configured to provide a spaceservice accessible within the distributed computing system, wherein thedisplay service advertisement is stored on the fourth device; whereinthe first message includes information for accessing the display serviceadvertisement on the fourth device through the space service; wherein,in accessing the display service advertisement, the first service isfurther configured to access the display service advertisement from thefourth device through the space service.
 38. A device, comprising: adisplay service accessible within a distributed computing system; and aclient process accessible within the distributed computing system;wherein the client process is configured to: establish a first messagingchannel between the client process and a first service in thedistributed computing environment; and send a first message to the firstservice on the first messaging channel, wherein the first messagespecifies a display service advertisement for enabling access to thedisplay service, wherein the display service advertisement comprises adata representation language message schema comprising descriptions ofone or more data representation language messages for sending data tothe display service; wherein the first service is operable to establisha second messaging channel between the first service and the displayservice in accordance with the display service advertisement; andgenerate one or more data representation language messages in accordancewith descriptions of the one or more data representation languagemessages from the data representation language message schema, whereinthe one or more data representation language messages include data forthe client process.
 39. The device as recited in claim 38, wherein thedevice further comprises a display; wherein the display service isconfigured to: receive the one or more data representation languagemessages on the second messaging channel, wherein the data for theclient process included in the one or more data representation languagemessages is generated by the first service for the client process; anddisplay the data received in the one or more data representationlanguage messages on the display of the device.
 40. The device asrecited in claim 38, wherein the device further comprises a display;wherein the client process is further configured to send a secondmessage to the first service on the first messaging channel, wherein thesecond message requests the first service to perform a function onbehalf of the client process; and wherein the display service is furtherconfigured to display results data on the display, wherein the firstservice performing the function generates the results data, and whereinthe results data are received in one or more results data messages sentto the display service by the first service on the second messagingchannel.
 41. The device as recited in claim 38, further comprising:wherein the device further comprises a display; wherein the clientprocess is further configured to send a second message to the firstservice on the first messaging channel, wherein the second messagerequests the first service to perform a function on behalf of the clientprocess; and wherein the first service performing the function for theclient generates results data, wherein the first service stores theresults data to a results space, and wherein the display service isfurther configured to: access the results data from the results space;and display the results data for the client on the display of thedevice.
 42. A device, comprising: a display; and a display serviceaccessible within a distributed computing system; wherein the displayservice is configured to provide a display service advertisement forenabling access to the display service to a client in the distributedcomputing environment, wherein the display service advertisementcomprises a data representation language message schema comprisingdescriptions of one or more data representation language messages forsending data to the display service; wherein the client is operable toprovide the display service advertisement to a first service in thedistributed computing environment; wherein the first service is operableto: establish a messaging channel between the first service and thedisplay service in accordance with the display service advertisement;and generate one or more data representation language messages inaccordance with descriptions of the one or more data representationlanguage messages from the data representation language message schema,wherein the one or more data representation language messages includedata for the client.
 43. The device as recited in claim 42, wherein thedisplay service is further configured to: receive the one or more datarepresentation language messages on the second messaging channel,wherein the data for the client included in the one or more datarepresentation language messages include data is generated by the firstservice for the client; and display the data received in the one or morerepresentation language data messages on the display of the device. 44.The device as recited in claim 42, wherein results data are generated bythe first service performing a function for the client, wherein thefirst service stores the results data to a results space, and whereinthe display service is further configured to: access the results datafrom the results space; and display the results data for the client onthe display of the device.
 45. A carrier medium comprising programinstructions, wherein the program instructions are computer-executableto implement: establishing a first messaging channel between a clientand a first service in a distributed computing environment, wherein thefirst messaging channel is configured to pass messages in a datarepresentation language between the client and the first service; theclient sending a first message to the first service on the firstmessaging channel, wherein the first message specifies a display serviceadvertisement for enabling access to a display service associated withthe client, wherein the display service advertisement comprises a datarepresentation language message schema comprising descriptions of one ormore data representation language messages for sending data to thedisplay service; the first service accessing the display serviceadvertisement as specified in the first message; the first serviceestablishing a second messaging channel between the first service andthe display service in accordance with the display service advertisementwherein the second messaging channel is configured to pass messages inthe data representation language between the first service and thedisplay service; and the first service generating one or more datarepresentation language messages in accordance with descriptions of theone or more data representation language messages from the datarepresentation language message schema, wherein the one or more datarepresentation language messages include data for the client.
 46. Thecarrier medium as recited in claim 45, wherein the data representationlanguage is eXtensible Markup Language (XML).
 47. The carrier medium asrecited in claim 45, wherein the program instructions are furthercomputer-executable to implement: the first service sending the one ormore data representation language messages to the display service on thesecond messaging channel; and the display service displaying the datafrom the one or more data representation language messages on a displayof the client.
 48. The carrier medium as recited in claim 45, whereinthe display service advertisement further comprises: an address for thedisplay service receiving the data messages, wherein the programinstructions are further computer-executable to implement: the firstservice sending the one or more representation language data message tothe address for the display service receiving the data representationlanguage messages; the display service receiving the one or more datarepresentation language messages; and the display service displaying thedata included in the one or more data representation language messageson a display of the client.
 49. The carrier medium as recited in claim45, wherein the program instructions are further computer-executable toimplement: the client sending a second message to the first service onthe first messaging channel, wherein the second message requests thefirst service to perform a function on behalf of the client; the firstservice performing the function as requested by the client, wherein saidperforming the function produces results data; the first service sendingone or more results data messages to the display service on the secondmessaging channel, wherein the one or more results data messages includethe results data produced by said performing the function; and thedisplay service displaying the results data from the one or more resultsdata messages on a display of the client.
 50. The carrier medium asrecited in claim 49, wherein the program instructions are furthercomputer-executable to implement: the first service storing the resultsdata on a results space in the distributed computing environment; thefirst service sending a results message to the display service on thesecond messaging channel, wherein the results message specifies aresults advertisement for accessing the results data stored on theresults space; the display service accessing the results data from theresults space in accordance with the results advertisement; and thedisplay service displaying the results data on a display of the client.51. The carrier medium as recited in claim 45 wherein the displayservice advertisement is on a storage device in the distributedcomputing environment, wherein the first message includes informationfor accessing the display service advertisement on the storage devicethrough a space service, wherein, in the first service accessing thedisplay service advertisement, the program instructions are furthercomputer-executable to implement accessing the display serviceadvertisement from the storage device through the space service.
 52. Thecarrier medium as recited in claim 45, wherein the display serviceadvertisement is an eXtensible Markup Language (XML) document.